mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] include: move PATH_MAX from fs.h to linux/limits.h
@ 2023-06-08  7:24 Ahmad Fatoum
  2023-06-09  6:45 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-06-08  7:24 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Linux defines PATH_MAX in <linux/limits.h> and code that just wants
PATH_MAX to format a path may not be interested in all the other stuff
defined in fs.h. Thus move PATH_MAX to <linux/limits.h> instead.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/fs.h           | 3 +--
 include/linux/limits.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/fs.h b/include/fs.h
index c64e78b38cf9..a61982e59ade 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -12,8 +12,7 @@
 #include <filetype.h>
 #include <linux/fs.h>
 #include <linux/string.h>
-
-#define PATH_MAX       1024        /* include/linux/limits.h */
+#include <linux/limits.h>
 
 struct partition;
 struct node_d;
diff --git a/include/linux/limits.h b/include/linux/limits.h
index 17375ef5225e..8baf8494943e 100644
--- a/include/linux/limits.h
+++ b/include/linux/limits.h
@@ -35,4 +35,6 @@
 #define S64_MAX		((s64)(U64_MAX >> 1))
 #define S64_MIN		((s64)(-S64_MAX - 1))
 
+#define PATH_MAX       1024
+
 #endif /* _LINUX_LIMITS_H */
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-09  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08  7:24 [PATCH] include: move PATH_MAX from fs.h to linux/limits.h Ahmad Fatoum
2023-06-09  6:45 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox