From: Andreas Schwab <schwab@suse.de>
To: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <gregkh@suse.de>, Tejun Heo <htejun@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: sysfs root link count broken in 2.6.22-git5
Date: Wed, 18 Jul 2007 22:12:52 +0200 [thread overview]
Message-ID: <jeir8hqxmj.fsf@sykes.suse.de> (raw)
In-Reply-To: <20070718220652.15ad2c4b@hyperion.delvare> (Jean Delvare's message of "Wed\, 18 Jul 2007 22\:06\:52 +0200")
Jean Delvare <khali@linux-fr.org> writes:
> On Tue, 17 Jul 2007 20:38:28 -0700, Greg KH wrote:
>> Isn't there some glibc
>> function that can detect the mount point of a filesystem or directory?
>> Something in glibc parses /proc/mounts for something, I can't remember
>> what it is right now though, sorry.
>
> Maybe getmntent(3)? Sure I could use this, but how expensive compared
> to a single stat(2).
How about comparing the device numbers of /sys and its parent? If they
are different then /sys is a mount point.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2007-07-18 20:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-15 10:42 Jean Delvare
2007-07-17 3:48 ` Greg KH
2007-07-17 11:12 ` Jean Delvare
2007-07-17 18:36 ` Greg KH
2007-07-17 21:05 ` Jean Delvare
2007-07-18 3:05 ` Tejun Heo
2007-07-18 3:38 ` Greg KH
2007-07-18 20:06 ` Jean Delvare
2007-07-18 20:12 ` Andreas Schwab [this message]
2007-07-19 7:42 ` Jean Delvare
2007-07-18 21:21 ` Oliver Pinter
2007-07-19 0:44 ` Kay Sievers
2007-07-19 8:41 ` Jean Delvare
2007-07-19 16:02 ` Jan Engelhardt
2007-07-18 5:29 ` [PATCH] sysfs: fix sysfs root inode nlink accounting Tejun Heo
2007-07-18 5:30 ` [PATCH] sysfs: make sysfs_init_inode() static Tejun Heo
2007-07-18 14:04 ` Jean Delvare
2007-07-18 14:02 ` [PATCH] sysfs: fix sysfs root inode nlink accounting Jean Delvare
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=jeir8hqxmj.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=gregkh@suse.de \
--cc=htejun@gmail.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®