In summary, this remains as unused as the prior code: the catch is
that we presently never exit voluntarily.
A watchdog parent + termination on signals, fatal conditions, etc,
would change the landscape. Especially since exiting with running
tapdisks is presently irrecoverable.
So for now just clean stuff up a little to prevent people from having
to investigate where all those return values go.
goto out;
err = tapdisk_daemon_start();
- if (err)
+ if (err) {
+ EPRINTF("failed to start %s: %d\n", argv[0], err);
goto out;
+ }
- tapdisk_daemon_run();
+ err = tapdisk_daemon_run();
tapdisk_daemon_stop();
+
tapdisk_daemon_free();
- err = 0;
out:
- if (err)
- EPRINTF("failed to start %s: %d\n", argv[0], err);
closelog();
- return err;
+
+ return err ? 1 : 0;
}