]> git.proxmox.com Git - mirror_qemu.git/commitdiff
os-posix: remove confused errno
authorGonglei <arei.gonglei@huawei.com>
Fri, 26 Sep 2014 08:14:31 +0000 (16:14 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 26 Sep 2014 17:20:50 +0000 (21:20 +0400)
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>
os-posix.c

index f0564ef9d9d7c9e2ac073685c77076bf4cce5210..e31a099a2b6019d029d1c3dd902800a793de1d1c 100644 (file)
@@ -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);