qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] os-posix: remove confused errno


From: arei.gonglei
Subject: [Qemu-devel] [PATCH 2/3] os-posix: remove confused errno
Date: Fri, 26 Sep 2014 16:14:31 +0800

From: Gonglei <address@hidden>

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 <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
 os-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os-posix.c b/os-posix.c
index f0564ef..e31a099 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);
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]