Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217379
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/15] tools lib api: Add STR and PATH_MAX macros to fs object |
| Date | 2015-09-02 10:00 +0200 |
| Message-ID | <q4b7z-7ff-1@gated-at.bofh.it> (permalink) |
| References | <q4b7z-7ff-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
We're going to get rid of findfs.h in following patches,
but we'll still need these macros.
Link: http://lkml.kernel.org/n/tip-mrjj0llsem9pjakkrx9o0j6g@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/lib/api/fs/fs.c | 3 +++
tools/lib/api/fs/fs.h | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index 128ef6332a6b..5e838d3c419d 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -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,
diff --git a/tools/lib/api/fs/fs.h b/tools/lib/api/fs/fs.h
index 6caa2bbc6cec..fd6288d73383 100644
--- a/tools/lib/api/fs/fs.h
+++ b/tools/lib/api/fs/fs.h
@@ -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
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 07/15] tools lib api: Add STR and PATH_MAX macros to fs object Jiri Olsa <jolsa@kernel.org> - 2015-09-02 10:00 +0200
csiph-web