From db7ece825a701b71906f29dce2da4287144abb85 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 21 Sep 2015 15:07:50 +0000 Subject: Trivial bugfixes in s6-rc-oneshot-run --- src/s6-rc/s6-rc-oneshot-run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/s6-rc/s6-rc-oneshot-run.c b/src/s6-rc/s6-rc-oneshot-run.c index 60834c8..becdf7b 100644 --- a/src/s6-rc/s6-rc-oneshot-run.c +++ b/src/s6-rc/s6-rc-oneshot-run.c @@ -16,7 +16,7 @@ int main (int argc, char const *const *argv, char const *const *envp) char const *live = S6RC_LIVE_BASE ; unsigned int number ; int up ; - PROG = "s6-rc-db" ; + PROG = "s6-rc-oneshot-run" ; { subgetopt_t l = SUBGETOPT_ZERO ; for (;;) @@ -59,8 +59,8 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!s6rc_db_read_sizes(fdcompiled, &db)) strerr_diefu3sys(111, "read ", compiled, "/n") ; - if (number >= db.nshort) - strerr_dief1x(3, "invalid oneshot number") ; + if (number < db.nlong || number >= db.nlong + db.nshort) + strerr_dief1x(3, "invalid service number") ; /* Allocate enough stack for the db */ -- cgit v1.2.3