aboutsummaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-26 16:14:31 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-09-26 21:20:50 +0400
commit97699eff3afc9c0dda865882415f81584b926727 (patch)
tree5b14274717a360e0d10fc1bfd52b25859d5f16e4 /os-posix.c
parent63ce8e150c2c3178c56b3969ec16ec702ced7abd (diff)
downloadqemu-arm-97699eff3afc9c0dda865882415f81584b926727.tar.gz
os-posix: remove confused errno
If we get inside the 'else if (status == 1)' conditional, then we know that read() succeeded, and therefore errno is unspecified. Printing strerror(errno) on a random value is not helpful. Cc: Eric Blake <eblake@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os-posix.c b/os-posix.c
index f0564ef9d9..e31a099a2b 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -226,7 +226,7 @@ void os_daemonize(void)
exit(1);
}
else if (status == 1) {
- fprintf(stderr, "Could not acquire pidfile: %s\n", strerror(errno));
+ fprintf(stderr, "Could not acquire pidfile\n");
exit(1);
} else {
exit(0);