diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-13 08:22:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-13 08:22:09 +0000 |
commit | 24d4e50eca03385c0f4b45f51092f4a5b4ccd0c1 (patch) | |
tree | 04a411eed5582f4c04532fc37dca90cfc330224a | |
parent | db7e83c95875fdc630a4014b323f9fbec205ba6c (diff) | |
download | s6-rc-24d4e50eca03385c0f4b45f51092f4a5b4ccd0c1.tar.xz |
Apply fixes suggested by Colin Booth
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/s6-rc.html | 9 | ||||
-rw-r--r-- | src/s6-rc/s6-rc-db.c | 3 | ||||
-rw-r--r-- | src/s6-rc/s6-rc.c | 1 |
4 files changed, 10 insertions, 5 deletions
diff --git a/doc/index.html b/doc/index.html index 543b4ca..6f6c0ad 100644 --- a/doc/index.html +++ b/doc/index.html @@ -110,7 +110,7 @@ the previous versions of s6-rc and the current one. </li> <li> <a href="s6-rc-init.html">The <tt>s6-rc-init</tt> program</a> </li> <li> <a href="s6-rc.html">The <tt>s6-rc</tt> program</a> </li> <li> <a href="s6-rc-dryrun.html">The <tt>s6-rc-dryrun</tt> internal program</a> </li> - <li> <a href="s6-rc-upgrade.html">The <tt>s6-rc-upgrade</tt> program</a> </li> + <li> <a href="s6-rc-update.html">The <tt>s6-rc-update</tt> program</a> </li> </ul> <h2> Related resources </h2> diff --git a/doc/s6-rc.html b/doc/s6-rc.html index ff18362..8d976d6 100644 --- a/doc/s6-rc.html +++ b/doc/s6-rc.html @@ -43,7 +43,7 @@ change. <pre> s6-rc help - s6-rc [ -l live ] [ -a ] list <em>servicenames...</em> + s6-rc [ -l live ] [ -a ] [ -u | -d ] list <em>servicenames...</em> s6-rc [ -l live ] [ -a ] [ -u | -d ] listall <em>servicenames...</em> s6-rc [ -l live ] [ -a ] [ -u | -d ] [ -p ] [ -v <em>verbosity</em> ] [ -n <em>dryrunthrottle</em> ] [ -t timeout ] change [ <em>servicenames...</em> ] </pre> @@ -137,12 +137,15 @@ all brought down, then the wanted services are all brought up. </li> <h3> s6-rc list <em>servicenames...</em> </h3> <p> - Prints the selection. + Prints the selection. If the <tt>-d</tt> option has been given, +the selection is inverted before it is printed, i.e. all the +services but <em>servicenames...</em> will be printed. </p> <p> This is mostly useful as <tt>s6-rc -a list</tt>, which simply prints -the list of currently active services. +the list of currently active services. <tt>s6-rc -da list</tt> +will print the list of currently down services. </p> <h3> s6-rc listall <em>servicenames...</em> </h3> 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 ; } |