Re: polling mechanism for media presence

Allen Curtis <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mar 21, 2007, at 7:48 AM, Alan Stern wrote:

> On Tue, 20 Mar 2007, Allen Curtis wrote:
>
>>>>> I am sorry. HAL? Where do I get this daemon?
>>>>
>>>> It's part of the hal package, which is included in Fedora and
>>>> presumably
>>>> other distributions as well.  See
>>>>
>>>> 	http://www.freedesktop.org/Software/hal
>>>
>>> What would an embedded distro use though?  HAL takes up
>>> multi-megabytes.
>>> A swapless system, with say 32 MB total RAM, probably won't find that
>>> to be a usable solution ...
>>>
>>
>> Gee Dave,
>>
>> How did you know? That is exactly what we have, an embedded system 
>> with
>> 32MB of RAM and no swap!
>>
>> We created the unusual_device entry to launch a kernel thread to do
>> this polling. This solution does not "feel" right but I do not know
>> what else to do.
>
> Another approach is to do the polling in userspace rather than in the
> kernel.  You could write a daemon that would constantly probe all the
> removable SCSI disk drives.  I don't know of any existing standalone
> program to do that.
>

This is our current, inefficient method. We actually have a batch file 
which sits around in a polling loop trying to mount or unmount the 
device depending on the current state.

It does work but it isn't very efficient. We actually did it this way 
as a "quick fix". I guess we stumbled onto the right solution?

- Allen



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.