All of lore.kernel.org
 help / color / mirror / Atom feed
* How to determine a path is a mountpoint.
@ 2010-02-15 21:53 Stef Bon
  2010-02-16  3:04 ` Ian Kent
  0 siblings, 1 reply; 12+ messages in thread
From: Stef Bon @ 2010-02-15 21:53 UTC (permalink / raw)
  To: autofs

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-02-22 16:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 21:53 How to determine a path is a mountpoint Stef Bon
2010-02-16  3:04 ` 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

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.