summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-07-13 08:22:09 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-07-13 08:22:09 +0000
commit24d4e50eca03385c0f4b45f51092f4a5b4ccd0c1 (patch)
tree04a411eed5582f4c04532fc37dca90cfc330224a /src
parentdb7e83c95875fdc630a4014b323f9fbec205ba6c (diff)
downloads6-rc-24d4e50eca03385c0f4b45f51092f4a5b4ccd0c1.tar.xz
Apply fixes suggested by Colin Booth
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc-db.c3
-rw-r--r--src/s6-rc/s6-rc.c1
2 files changed, 3 insertions, 1 deletions
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 ;
}