diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-01-31 11:18:24 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-01-31 11:18:24 +0000 |
commit | aa35510f1003777d309fa345ac373ba1b572c5ce (patch) | |
tree | 164de101c1e63b684df8bc3e4e350ba8b4877926 /src/libs6rc/s6rc_livedir_prefixsize.c | |
parent | 230393cd872421d26d37fa19378471a23a8ed466 (diff) | |
download | s6-rc-aa35510f1003777d309fa345ac373ba1b572c5ce.tar.xz |
Don't hard depend on PATH_MAX; change servicedir file list
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6rc/s6rc_livedir_prefixsize.c')
-rw-r--r-- | src/libs6rc/s6rc_livedir_prefixsize.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_livedir_prefixsize.c b/src/libs6rc/s6rc_livedir_prefixsize.c index d897fe6..ba14518 100644 --- a/src/libs6rc/s6rc_livedir_prefixsize.c +++ b/src/libs6rc/s6rc_livedir_prefixsize.c @@ -4,8 +4,11 @@ #include <string.h> #include <sys/stat.h> #include <errno.h> + #include <s6-rc/s6rc-utils.h> +#include <skalibs/posixishard.h> + int s6rc_livedir_prefixsize (char const *live, size_t *n) { struct stat st ; @@ -20,7 +23,7 @@ int s6rc_livedir_prefixsize (char const *live, size_t *n) return 1 ; } if (!S_ISREG(st.st_mode)) return (errno = EINVAL, 0) ; - if (st.st_size > PATH_MAX) return (errno = ENAMETOOLONG, 0) ; + if (st.st_size > SKALIBS_PATH_MAX) return (errno = ENAMETOOLONG, 0) ; *n = st.st_size ; return 1 ; } |