projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eeb7c03
)
Fix warning in qemu-nbd.c
author
Anthony Liguori
<aliguori@us.ibm.com>
Mon, 15 Jun 2009 17:49:59 +0000
(12:49 -0500)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Mon, 15 Jun 2009 17:51:37 +0000
(12:51 -0500)
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>
qemu-nbd.c
patch
|
blob
|
history
diff --git
a/qemu-nbd.c
b/qemu-nbd.c
index
0af97ca
..
9101487
100644
(file)
--- 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));