[Spice-devel] [vdagent-linux] vdagent: Return '1' when virtio device cannot be opened
Victor Toso
lists at victortoso.com
Tue Sep 8 01:27:40 PDT 2015
Hi,
On Mon, Sep 07, 2015 at 04:57:43PM +0200, Christophe Fergeau wrote:
> The vdagent process currently exits with an error code set to 0 whenn
^
when
> 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 7600b67..6c4ee8c 100644
> --- a/src/vdagent.c
> +++ b/src/vdagent.c
> @@ -303,7 +303,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)
> --
> 2.4.3
>
Looks good!
toso
More information about the Spice-devel
mailing list