[OE-core] [PATCH v2 1/1] latencytop: fix mount error

Paul Eggleton paul.eggleton at linux.intel.com
Sat Jul 12 08:41:13 UTC 2014


On Thursday 10 July 2014 15:46:21 Burton, Ross wrote:
> On 10 July 2014 14:50, Saul Wold <sgw at linux.intel.com> 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



More information about the Openembedded-core mailing list