diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-01-11 11:36:38 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-01-11 11:36:38 +0000 |
commit | a37ea0818a0889fbf36a4fbe918929b53fb0f7c6 (patch) | |
tree | 8b5721e9cea4bcdc016cd5a36c4f0c630ea94074 /src/supervision/s6-svc.c | |
parent | 7b9931e6403db6aeabb0ccc26e126dcf74cf3c03 (diff) | |
download | s6-a37ea0818a0889fbf36a4fbe918929b53fb0f7c6.tar.xz |
More bugfixes
And doc fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/supervision/s6-svc.c')
-rw-r--r-- | src/supervision/s6-svc.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/supervision/s6-svc.c b/src/supervision/s6-svc.c index 8c75abb..4485248 100644 --- a/src/supervision/s6-svc.c +++ b/src/supervision/s6-svc.c @@ -21,7 +21,6 @@ int main (int argc, char const *const *argv) { size_t len ; - int downfile = -1 ; unsigned int datalen = 1 ; unsigned int timeout = 0 ; char data[DATASIZE+1] = "-" ; @@ -51,6 +50,8 @@ int main (int argc, char const *const *argv) case 'o' : case 'd' : case 'u' : + case 'D' : + case 'U' : case 'x' : case 'O' : { @@ -58,20 +59,6 @@ int main (int argc, char const *const *argv) data[datalen++] = opt ; break ; } - case 'D' : - { - if (datalen >= DATASIZE) strerr_dief1x(100, "too many commands") ; - data[datalen++] = 'd' ; - downfile = 1 ; - break ; - } - case 'U' : - { - if (datalen >= DATASIZE) strerr_dief1x(100, "too many commands") ; - data[datalen++] = 'u' ; - downfile = 0 ; - break ; - } case 'T' : if (!uint0_scan(l.arg, &timeout)) dieusage() ; break ; case 'w' : { @@ -102,19 +89,6 @@ int main (int argc, char const *const *argv) } } - if (downfile >= 0) - { - char fn[len + 6] ; - memcpy(fn, argv[0], len) ; - memcpy(fn + len, "/down", 6) ; - if (downfile) - { - if (!openwritenclose_unsafe(fn, "", 0)) - strerr_diefu2sys(111, "touch ", fn) ; - } - else unlink_void(fn) ; - } - if (updown[1]) { char const *newargv[11] ; |