diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-21 16:42:59 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-21 16:42:59 +0000 |
commit | 6305fe2580781df44e93c1ec8ed380896680960d (patch) | |
tree | efb5c2c3ebe26118fed1e10d80874784060893f3 /src/daemontools-extras | |
parent | 3ea0b28892de170c5de281529613531dfa15eaa8 (diff) | |
download | s6-6305fe2580781df44e93c1ec8ed380896680960d.tar.xz |
Adapt to skalibs-2.7.0.0
Diffstat (limited to 'src/daemontools-extras')
-rw-r--r-- | src/daemontools-extras/s6-log.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index 10d78f3..04cfe8c 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <stdlib.h> #include <regex.h> +#include <skalibs/posixplz.h> #include <skalibs/uint64.h> #include <skalibs/types.h> #include <skalibs/allreadwrite.h> @@ -215,9 +216,7 @@ static inline int logdir_trim (logdir_t *ldp) } if (errno) { - int e = errno ; dir_close(dir) ; - errno = e ; return -1 ; } rewinddir(dir) ; @@ -252,9 +251,7 @@ static inline int logdir_trim (logdir_t *ldp) } if (errno) { - int e = errno ; dir_close(dir) ; - errno = e ; return -1 ; } dir_close(dir) ; @@ -586,9 +583,9 @@ static inline void logdir_init (unsigned int index, uint32_t s, uint32_t n, uint } else if (st.st_mode & S_IXUSR) goto opencurrent ; memcpy(x + dirlen + 1, "state", 6) ; - unlink(x) ; + unlink_void(x) ; memcpy(x + dirlen + 1, "newstate", 9) ; - unlink(x) ; + unlink_void(x) ; { int flagprocessed = 0 ; memcpy(x + dirlen + 1, "processed", 10) ; @@ -600,13 +597,13 @@ static inline void logdir_init (unsigned int index, uint32_t s, uint32_t n, uint if (flagprocessed) { memcpy(x + dirlen + 1, "previous", 9) ; - unlink(x) ; + unlink_void(x) ; if (finish(ldp, "processed", 's') < 0) strerr_diefu2sys(111, "finish processed .s for logdir ", ldp->dir) ; } else { - unlink(x) ; + unlink_void(x) ; if (finish(ldp, "previous", 'u') < 0) strerr_diefu2sys(111, "finish previous .u for logdir ", ldp->dir) ; } |