You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1000 B
30 lines
1000 B
From 0159111b22b449cf6a0225723c25f3a0938bce3f Mon Sep 17 00:00:00 2001 |
|
From: Christophe Fergeau <cfergeau@redhat.com> |
|
Date: Mon, 7 Sep 2015 16:38:10 +0200 |
|
Subject: [vdagent-linux] vdagent: Return '1' when virtio device cannot be |
|
opened |
|
|
|
The vdagent process currently exits with an error code set to 0 whenn |
|
the virtio device cannot be opened (for example because it's missing). |
|
This is not consistent with the other failures to startup which set the |
|
exit code to 1. This commit ensures 1 is returned in this situation too. |
|
|
|
Resolves: rhbz#1256704 |
|
--- |
|
src/vdagent.c | 3 ++- |
|
1 file changed, 2 insertions(+), 1 deletion(-) |
|
|
|
diff --git a/src/vdagent.c b/src/vdagent.c |
|
index 348dfbd..d3ca0c3 100644 |
|
--- a/src/vdagent.c |
|
+++ b/src/vdagent.c |
|
@@ -291,7 +291,8 @@ int main(int argc, char *argv[]) |
|
LOG_USER); |
|
|
|
if (file_test(portdev) != 0) { |
|
- return 0; |
|
+ syslog(LOG_ERR, "Cannot access vdagent virtio channel %s", portdev); |
|
+ return 1; |
|
} |
|
|
|
if (do_daemonize)
|
|
|