summaryrefslogtreecommitdiff
path: root/libdaemon
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2012-10-15 02:06:27 +0100
committerAlasdair G Kergon <agk@redhat.com>2012-10-15 02:06:27 +0100
commita0e60d27ff91c46a1febf58a955c6b88539ba982 (patch)
treeae7047958fc5efab9f46a87683bd28d2e5e6e219 /libdaemon
parent2393b468a4703be81f1d38ea7968931d30046087 (diff)
downloadlvm2-a0e60d27ff91c46a1febf58a955c6b88539ba982.tar.gz
lvmetad: document and tidy cmdline args
Try to bring the lvmetad usage text and man page closer to the code. There seem to be 3 useful ways to use -d with lvmetad at the moment: -d all -d wire -d debug (They can also be comma-separated like -d wire,debug.) Prior to the last release, -d, -dd and -ddd were supported. Fail if an unrecognised debug arg is supplied on the command line. Change -V to report the same version as the lvm binary: previously it just reported version 0.
Diffstat (limited to 'libdaemon')
-rw-r--r--libdaemon/server/daemon-server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index b02621f6f..3711419c6 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -506,7 +506,8 @@ void daemon_start(daemon_state s)
kill(getppid(), SIGTERM);
if (s.daemon_init)
- s.daemon_init(&s);
+ if (!s.daemon_init(&s))
+ failed = 1;
while (!_shutdown_requested && !failed) {
fd_set in;
@@ -525,7 +526,8 @@ void daemon_start(daemon_state s)
perror("unlink error");
if (s.daemon_fini)
- s.daemon_fini(&s);
+ if (!s.daemon_fini(&s))
+ failed = 1;
INFO(&s, "%s shutting down", s.name);