Re: [vdagent-linux] vdagent: Return '1' when virtio device cannot be opened

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

 



Acked!

> 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 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
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]