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

Re: [Xen-devel] [PATCH 9/9] xl: Improve return codes of main_domid(), main_domname() and main_sysrq() and related functions.



On Wed, 2016-02-24 at 18:23 +0530, Harmandeep Kaur wrote:
> Signed-off-by: Harmandeep Kaur <write.harmandeep@xxxxxxxxx>
>
So, this basically is "domain id and name related functions", or
"domain utility functions".

I'd rename the patch with something like that.

Also, I think find_domain() is fits nicely in here.

> ---
>  tools/libxl/xl_cmdimpl.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 9e0a467..234977c 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c

>  int main_domname(int argc, char **argv)
> @@ -6343,13 +6343,13 @@ int main_domname(int argc, char **argv)
>      if (domid == 0 && !strcmp(endptr, argv[optind])) {
>          /*no digits at all*/
>          fprintf(stderr, "Invalid domain id.\n\n");
> -        return 1;
> +        return EXIT_FAILURE;
>      }
>  
>      domname = libxl_domid_to_name(ctx, domid);
>      if (!domname) {
>          fprintf(stderr, "Can't get domain name of domain id '%d',
> maybe this domain does not exist.\n", domid);
> -        return 1;
> +        return EXIT_SUCCESS;
>      }
>  
>      printf("%s\n", domname);
>
main_rename() can well be done in this patch as well.

> @@ -6431,12 +6431,12 @@ int main_sysrq(int argc, char **argv)
>
While this one, I'd do it in another patch. (I'd probably move it to
patch 8)

Thanks and Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.