diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-09-02 09:56:42 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-04 12:01:01 -0300 |
commit | 709adcb33928b5bf965587b23ed6544e964584a3 (patch) | |
tree | 4c194e58157013953e55d21c38963873f454cfe0 /tools/lib/api/fs/fs.h | |
parent | 73ca85ad364769ffa312b1d892816d8fa23a02bf (diff) |
tools lib api fs: Add FSTYPE__configured() method
Add FSTYPE__configured() (where FSTYPE is one of sysfs, procfs, debugfs,
tracefs) interface that returns bool state of the filesystem mount:
true - mounted, false - not mounted
It will not try to mount the filesystem.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1441180605-24737-13-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api/fs/fs.h')
-rw-r--r-- | tools/lib/api/fs/fs.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/lib/api/fs/fs.h b/tools/lib/api/fs/fs.h index a9627ea5e6ae..f654bcb99d1e 100644 --- a/tools/lib/api/fs/fs.h +++ b/tools/lib/api/fs/fs.h @@ -1,6 +1,8 @@ #ifndef __API_FS__ #define __API_FS__ +#include <stdbool.h> + /* * On most systems <limits.h> would have given us this, but not on some systems * (e.g. GNU/Hurd). @@ -11,7 +13,8 @@ #define FS(name) \ const char *name##__mountpoint(void); \ - const char *name##__mount(void); + const char *name##__mount(void); \ + bool name##__configured(void); \ FS(sysfs) FS(procfs) |