[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to find my usb storage device mount point
Le Fri, 12 Sep 2008 12:33:18 +0530,
ravikumar <ravikumar.vallabhu@xxxxxxxxx> a écrit :
> Done the detection part by looking /proc/bus/usb/devices file.
You'd better do this using HAL and D-Bus, which will notify you when a
device is mounted. Not need to poll /proc/bus/usb/devices.
> For inotify ,i need to provide the the file/directory to be watched.
> I wanted to provide usb device mount point as a input inotify, so
> that it can monitor.
> My question is how can i get the mount point. I can get using df
> command, for that i need device file to which my storage device
> atatched.
The directory in which an USB storage device has been mounted is
readily available if you use the HAL/D-Bus method I mentionned
previously. See the Python example I gave.
But all this discussion has pretty much nothing to do with the kernel,
so the kernelnewbies list is probably not the best place to have such
discussion.
Sincerly,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ