Re: [PATCH] include: move PATH_MAX from fs.h to linux/limits.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 08, 2023 at 09:24:00AM +0200, Ahmad Fatoum wrote:
> 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@xxxxxxxxxxxxxx>
> ---
>  include/fs.h           | 3 +--
>  include/linux/limits.h | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux