summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-08-10 15:26:04 +0000
committerLaurent Bercot <ska@appnovation.com>2022-08-10 15:26:04 +0000
commit6bb2a30d2a5706813a8d9c3785fbe6b9b08e5faf (patch)
tree48a6d876b56ced57ac5dd76f100bcdf15dd4f473 /src
parent9fa760e14ee2aa97a2ec281fce2169fcf7e2754d (diff)
downloads6-rc-6bb2a30d2a5706813a8d9c3785fbe6b9b08e5faf.tar.xz
bugfix: print correct livedir location in s6-rc error messages
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c
index d99d6aa..dfd07af 100644
--- a/src/s6-rc/s6-rc.c
+++ b/src/s6-rc/s6-rc.c
@@ -566,12 +566,13 @@ int main (int argc, char const *const *argv)
{
ssize_t r = openreadnclose(dbfn, (char *)state, n) ;
if (r == -1) strerr_diefu2sys(111, "read ", dbfn) ;
- if (r < n) strerr_diefu2x(4, "read valid db in ", dbfn) ;
+ if (r < n) strerr_diefu2x(4, "read valid state in ", dbfn) ;
{
unsigned int i = n ;
while (i--) state[i] &= 1 ;
}
}
+ dbfn[livelen] = 0 ;
/* Read the db from the file */