On Thursday 10 July 2014 15:46:21 Burton, Ross wrote: > On 10 July 2014 14:50, Saul Wold <[email protected]> wrote: > > I think Ross's suggestion of using stat() to check for the existance of a > > file in debugfs would be better. > > At least one good way of checking if a directory is a mount point is > to compare the device of / and /debug using stat(). For example: > > $ stat -c %d / > 2049 > $ stat -c %d /sys > 13 > > Different devices, so /sys is a mount.
This came up a while back in another context, and someone (Phil?) pointed out the "mountpoint" standard Unix command which does exactly this. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
