Messages in this thread |  | | | Subject | Re: _reliable_ way to get the dev for a mount point? | | From | Xavier Bestel <> | | Date | 06 May 2002 20:10:30 +0200 |
| |
Le lun 06/05/2002 à 19:38, Erik Andersen a écrit : > On Mon May 06, 2002 at 11:55:38AM +0200, Pozsar Balazs wrote: > > So, my question is there a way to get back the device for a directory, > > _reliably_. (I want to know which devices holds the files my process sees > > under an arbitrary /path/to/somewhere). > > stat(mnt_point, &statbuf); then walk through /dev and stat each > device, check that it is a block device and that st_rdev matches > the statbuf.st_rdev. When you get a match, you know a device > name for the directory.
is devfs walkable ? I mean, no loops or infinite dynamically generated directory ?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |