From aa35510f1003777d309fa345ac373ba1b572c5ce Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 31 Jan 2023 11:18:24 +0000 Subject: Don't hard depend on PATH_MAX; change servicedir file list Signed-off-by: Laurent Bercot --- src/libs6rc/s6rc_livedir_prefixsize.c | 5 ++++- src/libs6rc/s6rc_servicedir_internal.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libs6rc') 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 #include #include + #include +#include + 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 ; } diff --git a/src/libs6rc/s6rc_servicedir_internal.c b/src/libs6rc/s6rc_servicedir_internal.c index 2c2c859..9c2e429 100644 --- a/src/libs6rc/s6rc_servicedir_internal.c +++ b/src/libs6rc/s6rc_servicedir_internal.c @@ -24,8 +24,7 @@ static s6_servicedir_desc const svdir_file_list[] = { .name = "timeout-finish", .type = S6_FILETYPE_UINT, .options = 0 }, { .name = "max-death-tally", .type = S6_FILETYPE_UINT, .options = 0 }, { .name = "down-signal", .type = S6_FILETYPE_NORMAL, .options = 0 }, - { .name = "instance", .type = S6_FILETYPE_DIR, .options = 0 }, - { .name = "instances", .type = S6_FILETYPE_DIR, .options = 0 }, + { .name = "template", .type = S6_FILETYPE_DIR, .options = 0 }, { .name = "data", .type = S6_FILETYPE_DIR, .options = 0 }, { .name = "env", .type = S6_FILETYPE_DIR, .options = 0 }, { .name = 0, .options = 0 } -- cgit v1.2.3