lkml.org 
[lkml]   [2002]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: _reliable_ way to get the dev for a mount point?
Date
> > 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 ?

If not, you still can do that but walk method must be clever
(do 1-level deep search, then 2-level, etc)
--
vda
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.045 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site