]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tools lib api fs: Add STR and PATH_MAX macros to fs object
authorJiri Olsa <jolsa@kernel.org>
Wed, 2 Sep 2015 07:56:37 +0000 (09:56 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 4 Sep 2015 15:00:58 +0000 (12:00 -0300)
We're going to get rid of findfs.h in following patches, but we'll still
need these macros.

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-8-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/api/fs/fs.c
tools/lib/api/fs/fs.h

index 128ef6332a6bd89c0ddbeef283c4dfccbf5f8417..5e838d3c419d58af5fa3fe91c614567db7fc1266 100644 (file)
@@ -15,6 +15,9 @@
 #include "debugfs.h"
 #include "fs.h"
 
+#define _STR(x) #x
+#define STR(x) _STR(x)
+
 static const char * const sysfs__fs_known_mountpoints[] = {
        "/sys",
        0,
index 6caa2bbc6cecdc2f7fa39b69fa1cf30f8653f15e..fd6288d733832c56de9c4ab52c51b0e8714a2987 100644 (file)
@@ -1,6 +1,14 @@
 #ifndef __API_FS__
 #define __API_FS__
 
+/*
+ * On most systems <limits.h> would have given us this, but  not on some systems
+ * (e.g. GNU/Hurd).
+ */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 #ifndef SYSFS_MAGIC
 #define SYSFS_MAGIC            0x62656572
 #endif