[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/9] xl: Improve return and exit codes of main_console(), main_vncviewer() and main_dump_core().
[Re-adding xen-devel... please, don't drop it. :-)] On Tue, 2016-03-08 at 13:08 +0530, Harmandeep Kaur wrote: > On Thu, Feb 25, 2016 at 5:03 PM, Dario Faggioli > <dario.faggioli@xxxxxxxxxx> wrote: > > > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > > > > @@ -3457,8 +3457,8 @@ int main_vncviewer(int argc, char **argv) > > > domid = find_domain(argv[optind]); > > > > > > if (vncviewer(domid, autopass)) > > > - return 1; > > > - return 0; > > > + return EXIT_FAILURE; > > > + return EXIT_SUCCESS; > > > > > Have a look at vncviewer() and autoconnect_vncviewer() too. > > > I am not sure about vncviewer(), do we need something like below: > > static int vncviewer(uint32_t domid, int autopass) > { > if (!libxl_vncviewer_exec(ctx, domid, autopass)) { > fprintf(stderr, "Unable to execute vncviewer\n"); > return 1; > } > } > That won't compile, I think. It's an internal function, and this patch is changing a bunch of internal functions into returning -1 on failure ad 0 on success, which is something vncviewer() is not doing. It's not too big of a deal, honestly, and you can even let it alone (we're not going to get 100% consistency anyway), but I thought you may want to at least consider what to do. OTOH, autoconnect_vncviewer() does have an _exit() that needs to be dealt with. 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |