From 0d985a7430299aba28e136d9558497ae02c8085e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 16 Jun 2019 20:50:58 +0200 Subject: [PATCH] Add RDSVC_NO_DESC flag Signed-off-by: David Oberhollenzer --- lib/include/service.h | 1 + lib/init/rdsvc.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/include/service.h b/lib/include/service.h index 3cb799a..cc01c5d 100644 --- a/lib/include/service.h +++ b/lib/include/service.h @@ -36,6 +36,7 @@ enum { RDSVC_NO_EXEC = 0x02, /* do not store executable script */ RDSVC_NO_CTTY = 0x04, /* do not store the controlling tty */ RDSVC_NO_DEPS = 0x08, /* do not store dependencies */ + RDSVC_NO_DESC = 0x10, /* do not store description */ }; enum { diff --git a/lib/init/rdsvc.c b/lib/init/rdsvc.c index 0e5bc99..27ce5e5 100644 --- a/lib/init/rdsvc.c +++ b/lib/init/rdsvc.c @@ -47,7 +47,9 @@ static int try_pack_argv(char *str, rdline_t *rd) static int svc_desc(void *user, char *arg, rdline_t *rd, int flags) { service_t *svc = user; - (void)flags; + + if (flags & RDSVC_NO_DESC) + return 0; if (try_unescape(arg, rd)) return -1;