Blame SOURCES/0018-vdagent-Return-1-when-virtio-device-cannot-be-opened.patch

a547b4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a547b4
From: Christophe Fergeau <cfergeau@redhat.com>
a547b4
Date: Mon, 7 Sep 2015 16:38:10 +0200
a547b4
Subject: [PATCH] vdagent: Return '1' when virtio device cannot be opened
a547b4
a547b4
The vdagent process currently exits with an error code set to 0 whenn
a547b4
the virtio device cannot be opened (for example because it's missing).
a547b4
This is not consistent with the other failures to startup which set the
a547b4
exit code to 1. This commit ensures 1 is returned in this situation too.
a547b4
a547b4
Resolves: rhbz#1256704
a547b4
---
a547b4
 src/vdagent.c | 3 ++-
a547b4
 1 file changed, 2 insertions(+), 1 deletion(-)
a547b4
a547b4
diff --git a/src/vdagent.c b/src/vdagent.c
a547b4
index a26af73..1336faa 100644
a547b4
--- a/src/vdagent.c
a547b4
+++ b/src/vdagent.c
a547b4
@@ -238,7 +238,8 @@ int main(int argc, char *argv[])
a547b4
             LOG_USER);
a547b4
 
a547b4
     if (file_test(portdev) != 0) {
a547b4
-        return 0;
a547b4
+        syslog(LOG_ERR, "Cannot access vdagent virtio channel %s", portdev);
a547b4
+        return 1;
a547b4
     }
a547b4
 
a547b4
     if (do_daemonize)