Scanning for mountable filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am helping to design a small user-space daemon for an embedded
system that will mount external storage media (SD cards, USB mass
storage).

The daemon receives udev events via a socket.  It determines which
events are filesystem related (using the ID_FS_xxx keys) and executes
a mount/unmount using the event information.

This works fine if the media is inserted/removed after the daemon runs.

But what about media that is inserted before my daemon has a change to run?

One solution may be to use "udevadm trigger --subsystem-match=block"
after my daemon has started.  Is this recommended?

I was wondering whether I can use the output of "udevadm info
--export-db" to scan for mountable filesystems as part of the daemon
initialisation (before it receives udev events).

Any comments on this?

Regards,
Kam-Yung
-- 
Soh Kam Yung
my Google Reader Shared links:
(http://www.google.com/reader/shared/16851815156817689753)
my Google Reader Shared SFAS links:
(http://www.google.com/reader/shared/user/16851815156817689753/label/sfas)
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux