[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 for Xen 4.7 4/4] xl: enable per-VCPU parameter settings for RTDS scheduler
I saw quite a few coding style issues. Please fix them in next iteration. On Sun, Mar 06, 2016 at 11:55:58AM -0600, Chong Li wrote: [...] > > - if (cpupool && (dom || opt_p || opt_b)) { > + if (cpupool && (dom || opt_p || opt_b || opt_v || opt_all)) { > fprintf(stderr, "Specifying a cpupool is not allowed with " > "other options.\n"); > - return EXIT_FAILURE; > + rc = 1; The exit value should be EXIT_FAILURE. > + goto out; > } > - if (!dom && (opt_p || opt_b)) { > - fprintf(stderr, "Must specify a domain.\n"); > - return EXIT_FAILURE; > + if (!dom && (opt_p || opt_b || opt_v)) { > + fprintf(stderr, "Missing parameters.\n"); > + rc = 1; > + goto out; > } [...] > > - rc = sched_domain_set(domid, &scinfo); > - libxl_domain_sched_params_dispose(&scinfo); > - if (rc) > - return EXIT_FAILURE; > + libxl_vcpu_sched_params_dispose(&scinfo); > + if (rc) { > + rc = -rc; > + goto out; > + } > } > } > Set rc to EXIT_SUCCESS here. Wei. > - return EXIT_SUCCESS; > +out: > + free(vcpus); > + free(periods); > + free(budgets); > + return rc; > } > > int main_domid(int argc, char **argv) > diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c > index fdc1ac6..c68b656 100644 > --- a/tools/libxl/xl_cmdtable.c > +++ b/tools/libxl/xl_cmdtable.c > @@ -268,10 +268,12 @@ struct cmd_spec cmd_table[] = { > { "sched-rtds", > &main_sched_rtds, 0, 1, > "Get/set rtds scheduler parameters", > - "[-d <Domain> [-p[=PERIOD]] [-b[=BUDGET]]]", > - "-d DOMAIN, --domain=DOMAIN Domain to modify\n" > - "-p PERIOD, --period=PERIOD Period (us)\n" > - "-b BUDGET, --budget=BUDGET Budget (us)\n" > + "[-d <Domain> [-v[=VCPUID]] [-p[=PERIOD]] [-b[=BUDGET]]]", > + "-d DOMAIN, --domain=DOMAIN Domain to modify\n" > + "-v VCPUID/all, --vcpuid=VCPUID/all VCPU to modify or output;\n" > + " Using '-v all' to modify/output all > vcpus\n" > + "-p PERIOD, --period=PERIOD Period (us)\n" > + "-b BUDGET, --budget=BUDGET Budget (us)\n" > }, > { "domid", > &main_domid, 0, 0, > -- > 1.9.1 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |