From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] include: move PATH_MAX from fs.h to linux/limits.h
Date: Thu, 8 Jun 2023 09:24:00 +0200 [thread overview]
Message-ID: <20230608072400.3275489-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2023-06-08 7:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 7:24 Ahmad Fatoum [this message]
2023-06-09 6:45 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230608072400.3275489-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox