From: Stef Bon <stef@bononline.nl>
To: autofs@linux.kernel.org
Subject: How to determine a path is a mountpoint.
Date: Mon, 15 Feb 2010 22:53:46 +0100 [thread overview]
Message-ID: <201002152253.46863.stef@bononline.nl> (raw)
Hello,
I'm working on a construction of the automounter in combination with a fuse
module.
The automounter is the mounthelper.
I'm looking for a way to determine in C a directory is a mountpoint, specially
a autofs managed directory, so a virtual directory created by the automounter.
I can parse the /etc/mtab file or /proc/mounts, like in bash:
cat /proc/mounts | grep --word-regexp "$mountpoint"
but this is slow.. I have looked to the code of the program mountpoint,
but this is not possible in an autofs maneged directory. This program
does a cd to the directory and checks the filesystem changes. With autofs this
makes the mountpoint always mounted, which is of course not what I'm looking
for.
Stef
next reply other threads:[~2010-02-15 21:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 21:53 Stef Bon [this message]
2010-02-16 3:04 ` How to determine a path is a mountpoint Ian Kent
2010-02-16 13:20 ` Stef Bon
2010-02-16 17:29 ` Ian Kent
2010-02-17 12:43 ` Stef Bon
2010-02-17 14:25 ` Ian Kent
2010-02-18 23:18 ` Stef Bon
2010-02-19 3:57 ` Ian Kent
2010-02-19 14:11 ` Stef Bon
[not found] ` <201002211428.39077.stef@bononline.nl>
2010-02-22 3:54 ` Ian Kent
2010-02-22 16:30 ` Stef Bon
2010-02-22 16:38 ` Ian Kent
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=201002152253.46863.stef@bononline.nl \
--to=stef@bononline.nl \
--cc=autofs@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.