A minor problem w/ access to my flash drive

Alexey Morozov alex-hp at idisys.iae.nsk.su
Mon Jan 24 02:42:33 PST 2005


Pozsar Balazs writes:

>On Mon, Jan 24, 2005 at 02:17:04PM +0600, Alexey Morozov wrote:
>  
>
>>>      
>>>
>>But why?? I always thought that USB devices have true notification 
>>model, so a device exists till appropriate disconnect event is received. 
>>    
>>
>There is notification about usb removal. So far so good.
>  
>
Sure, I'm talking about this particular flash drive ;-)

>The problem is, if you plug in an usb card reader you do not get 
>notification about plugging/unplugging card into/from it. That's why hal 
>  
>
No, that's not always true. Just a few hours ago I plugged in a friend's 
CF into my card reader and, voila, I have 'magically appeared' 
/media/storage_sda1 and corresponding /dev/sda1. I'm sure that there 
were hotplug/udev events on both plugging and unplugging the card 
(because I have quite custom udev scripts, so /dev/sda1 was a symlink to 
/dev/discs1/part1 which didn't exist before I put the card in).

>polls these devices. It cannot distinguish a card reader and an usb 
>stick from which you cannot remove the "media".
>  
>
Actually I can ;-). In hal-device-manager. It's called 'Flash Reader' 
and has properties different from a 'proper' USB flash. Honestly :-). If 
you need I can collect properties from both devices so you can compare 
them...

>Maybe hal could have a list about non-card-readers, and not poll them? 
>(whitelisting). That would seem a good idea to me.
>
>So it would not poll devices it knows it doesnt need to.
>  
>
I guess there should be a _blacklist_. At least for me ;-).

BTW, I noticed that HAL _did_ not created appropriate mount entry for 
the CF-card. That mount entry was created by blockdev.hotplug script.

Alexey

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list