aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-06-15 12:49:59 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-15 12:51:37 -0500
commitf5de141b34f3ca1c5aef58403cfd16cf10715bff (patch)
treebd1e213daa48162ed744b5252bd2b14d35186bfd /qemu-nbd.c
parentAdd rtc reset function. (diff)
downloadqemu-kvm-f5de141b34f3ca1c5aef58403cfd16cf10715bff.tar.gz
qemu-kvm-f5de141b34f3ca1c5aef58403cfd16cf10715bff.tar.bz2
qemu-kvm-f5de141b34f3ca1c5aef58403cfd16cf10715bff.zip
Fix warning in qemu-nbd.c
qemu-nbd.c:349: error: ignoring return value of 'daemon', declared with attribute warn_unused_result Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 0af97ca2c..910148712 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -345,8 +345,12 @@ int main(int argc, char **argv)
pid_t pid;
int sock;
- if (!verbose)
- daemon(0, 0); /* detach client and server */
+ if (!verbose) {
+ /* detach client and server */
+ if (daemon(0, 0) == -1) {
+ errx(errno, "Failed to daemonize");
+ }
+ }
if (socket == NULL) {
sprintf(sockpath, SOCKET_PATH, basename(device));