Re: [PATCH 4/5] tools lib api fs: Add {tracefs,debugfs}_configured() functions

From: Steven Rostedt
Date: Sun Jan 25 2015 - 14:27:37 EST


On Sun, 25 Jan 2015 18:02:03 +0100
Jiri Olsa <jolsa@xxxxxxxxxx> wrote:

> On Sat, Jan 24, 2015 at 01:13:34PM -0500, Steven Rostedt wrote:
>
> SNIP
>
> > #include <sys/mount.h>
> > #include <linux/kernel.h>
> >
> > @@ -24,6 +27,16 @@ static const char * const debugfs_known_mountpoints[] = {
> >
> > static bool debugfs_found;
> >
> > +bool debugfs_configured(void)
> > +{
> > + struct stat st;
> > +
> > + if (stat(DEBUGFS_DEFAULT_PATH, &st) < 0)
> > + return false;
> > +
>
> hum, should this function rather do
>
> bool debugfs_configured(void)
> {
> return debugfs_find_mountpoint() != NULL;
> }
>
>
> SNIP
>
> > static bool tracefs_found;
> >
> > +bool tracefs_configured(void)
> > +{
> > + struct stat st;
> > +
> > + if (stat(TRACEFS_DEFAULT_PATH, &st) < 0)
> > + return false;
> > +
> > + return true;
> > +}
>
> same for this one..


OK, will change.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/