public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xavier Bestel <xavier.bestel@free.fr>
To: andersen@codepoet.org
Cc: Pozsar Balazs <pozsy@sch.bme.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: _reliable_ way to get the dev for a mount point?
Date: 06 May 2002 20:10:30 +0200	[thread overview]
Message-ID: <1020708630.17586.41.camel@bip> (raw)
In-Reply-To: <20020506173857.GA24013@codepoet.org>

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 ?



  reply	other threads:[~2002-05-06 18:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-06  9:55 _reliable_ way to get the dev for a mount point? Pozsar Balazs
2002-05-06 17:38 ` Erik Andersen
2002-05-06 18:10   ` Xavier Bestel [this message]
2002-05-08 10:28     ` Denis Vlasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020708630.17586.41.camel@bip \
    --to=xavier.bestel@free.fr \
    --cc=andersen@codepoet.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pozsy@sch.bme.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox