[libvirt] [PATCH] Address missed feedback from review of virt-login-shell

Eric Blake eblake at redhat.com
Tue Aug 13 12:32:34 UTC 2013


On 08/13/2013 05:16 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Address a number of code, style and docs issues identified
> in review of virt-login-shell after it was merged.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  tools/Makefile.am          |  1 -
>  tools/virt-login-shell.c   | 58 ++++++++++++++++++++++++++++++----------------
>  tools/virt-login-shell.pod | 30 ++++++++++++++++++------
>  3 files changed, 61 insertions(+), 28 deletions(-)

ACK.

> @@ -327,7 +345,7 @@ main(int argc, char **argv)
>              }
>              if (execv(shargv[0], (char *const*) shargv) < 0) {
>                  virReportSystemError(errno, _("Unable exec shell %s"), shargv[0]);
> -                return -errno;
> +                return EXIT_FAILURE;

Setting $? to 1 works, although it's more typical to set to 126 or 127
on execv failure.  But I'm fine with it as-is.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130813/42f1b84e/attachment-0001.sig>


More information about the libvir-list mailing list