From 24d4e50eca03385c0f4b45f51092f4a5b4ccd0c1 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 13 Jul 2015 08:22:09 +0000 Subject: Apply fixes suggested by Colin Booth --- src/s6-rc/s6-rc-db.c | 3 ++- src/s6-rc/s6-rc.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/s6-rc/s6-rc-db.c b/src/s6-rc/s6-rc-db.c index e6b5e8c..8cfe5b9 100644 --- a/src/s6-rc/s6-rc-db.c +++ b/src/s6-rc/s6-rc-db.c @@ -50,7 +50,8 @@ static void print_bundle_contents (char const *name) strerr_dief2x(4, "invalid database in ", compiled) ; if (!str_diff(name, db->string + db->services[x].name)) strerr_dief5x(1, "in database ", compiled, ": identifier ", name, " represents an atomic service") ; - if (buffer_puts(buffer_1, db->string + db->services[x].name) < 0) + if (buffer_puts(buffer_1, db->string + db->services[x].name) < 0 + || buffer_put(buffer_1, "\n", 1) < 0) strerr_diefu1sys(111, "write to stdout") ; } else diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c index eaaf036..4cb68b6 100644 --- a/src/s6-rc/s6-rc.c +++ b/src/s6-rc/s6-rc.c @@ -516,6 +516,7 @@ int main (int argc, char const *const *argv) if (what == 1) { + if (!up) invert_selection() ; print_services() ; return 0 ; } -- cgit v1.2.3