* [PATCH] xl: use bool type for flags instead of int
@ 2016-02-06 2:00 Dario Faggioli
2016-02-08 10:21 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Dario Faggioli @ 2016-02-06 2:00 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Ian Jackson, Ian Campbell, George Dunlap
in schedulers' command handlers.
No functional change intended.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: George Dunlap <george.dunlap@citrix.com>
---
tools/libxl/xl_cmdimpl.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 20704d2..d07ccb2 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -6035,9 +6035,11 @@ int main_sched_credit(int argc, char **argv)
{
const char *dom = NULL;
const char *cpupool = NULL;
- int weight = 256, cap = 0, opt_w = 0, opt_c = 0;
- int opt_s = 0;
- int tslice = 0, opt_t = 0, ratelimit = 0, opt_r = 0;
+ int weight = 256, cap = 0;
+ int tslice = 0, ratelimit = 0;
+ bool opt_w = false, opt_c = false;
+ bool opt_t = false, opt_r = false;
+ bool opt_s = false;
int opt, rc;
static struct option opts[] = {
{"domain", 1, 0, 'd'},
@@ -6056,22 +6058,22 @@ int main_sched_credit(int argc, char **argv)
break;
case 'w':
weight = strtol(optarg, NULL, 10);
- opt_w = 1;
+ opt_w = true;
break;
case 'c':
cap = strtol(optarg, NULL, 10);
- opt_c = 1;
+ opt_c = true;
break;
case 't':
tslice = strtol(optarg, NULL, 10);
- opt_t = 1;
+ opt_t = true;
break;
case 'r':
ratelimit = strtol(optarg, NULL, 10);
- opt_r = 1;
+ opt_r = true;
break;
case 's':
- opt_s = 1;
+ opt_s = true;
break;
case 'p':
cpupool = optarg;
@@ -6157,7 +6159,8 @@ int main_sched_credit2(int argc, char **argv)
{
const char *dom = NULL;
const char *cpupool = NULL;
- int weight = 256, opt_w = 0;
+ int weight = 256;
+ bool opt_w = false;
int opt, rc;
static struct option opts[] = {
{"domain", 1, 0, 'd'},
@@ -6172,7 +6175,7 @@ int main_sched_credit2(int argc, char **argv)
break;
case 'w':
weight = strtol(optarg, NULL, 10);
- opt_w = 1;
+ opt_w = true;
break;
case 'p':
cpupool = optarg;
@@ -6246,11 +6249,11 @@ int main_sched_rtds(int argc, char **argv)
break;
case 'p':
period = strtol(optarg, NULL, 10);
- opt_p = 1;
+ opt_p = true;
break;
case 'b':
budget = strtol(optarg, NULL, 10);
- opt_b = 1;
+ opt_b = true;
break;
case 'c':
cpupool = optarg;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xl: use bool type for flags instead of int
2016-02-06 2:00 [PATCH] xl: use bool type for flags instead of int Dario Faggioli
@ 2016-02-08 10:21 ` George Dunlap
2016-02-08 15:45 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: George Dunlap @ 2016-02-08 10:21 UTC (permalink / raw)
To: Dario Faggioli, xen-devel; +Cc: Wei Liu, Ian Jackson, Ian Campbell
On 06/02/16 02:00, Dario Faggioli wrote:
> in schedulers' command handlers.
>
> No functional change intended.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: George Dunlap <george.dunlap@citrix.com>
> ---
> tools/libxl/xl_cmdimpl.c | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 20704d2..d07ccb2 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -6035,9 +6035,11 @@ int main_sched_credit(int argc, char **argv)
> {
> const char *dom = NULL;
> const char *cpupool = NULL;
> - int weight = 256, cap = 0, opt_w = 0, opt_c = 0;
> - int opt_s = 0;
> - int tslice = 0, opt_t = 0, ratelimit = 0, opt_r = 0;
> + int weight = 256, cap = 0;
> + int tslice = 0, ratelimit = 0;
> + bool opt_w = false, opt_c = false;
> + bool opt_t = false, opt_r = false;
> + bool opt_s = false;
> int opt, rc;
> static struct option opts[] = {
> {"domain", 1, 0, 'd'},
> @@ -6056,22 +6058,22 @@ int main_sched_credit(int argc, char **argv)
> break;
> case 'w':
> weight = strtol(optarg, NULL, 10);
> - opt_w = 1;
> + opt_w = true;
> break;
> case 'c':
> cap = strtol(optarg, NULL, 10);
> - opt_c = 1;
> + opt_c = true;
> break;
> case 't':
> tslice = strtol(optarg, NULL, 10);
> - opt_t = 1;
> + opt_t = true;
> break;
> case 'r':
> ratelimit = strtol(optarg, NULL, 10);
> - opt_r = 1;
> + opt_r = true;
> break;
> case 's':
> - opt_s = 1;
> + opt_s = true;
> break;
> case 'p':
> cpupool = optarg;
> @@ -6157,7 +6159,8 @@ int main_sched_credit2(int argc, char **argv)
> {
> const char *dom = NULL;
> const char *cpupool = NULL;
> - int weight = 256, opt_w = 0;
> + int weight = 256;
> + bool opt_w = false;
> int opt, rc;
> static struct option opts[] = {
> {"domain", 1, 0, 'd'},
> @@ -6172,7 +6175,7 @@ int main_sched_credit2(int argc, char **argv)
> break;
> case 'w':
> weight = strtol(optarg, NULL, 10);
> - opt_w = 1;
> + opt_w = true;
> break;
> case 'p':
> cpupool = optarg;
> @@ -6246,11 +6249,11 @@ int main_sched_rtds(int argc, char **argv)
> break;
> case 'p':
> period = strtol(optarg, NULL, 10);
> - opt_p = 1;
> + opt_p = true;
> break;
> case 'b':
> budget = strtol(optarg, NULL, 10);
> - opt_b = 1;
> + opt_b = true;
> break;
> case 'c':
> cpupool = optarg;
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xl: use bool type for flags instead of int
2016-02-08 10:21 ` George Dunlap
@ 2016-02-08 15:45 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2016-02-08 15:45 UTC (permalink / raw)
To: George Dunlap, Dario Faggioli, xen-devel; +Cc: Wei Liu, Ian Jackson
On Mon, 2016-02-08 at 10:21 +0000, George Dunlap wrote:
> On 06/02/16 02:00, Dario Faggioli wrote:
> > in schedulers' command handlers.
> >
> > No functional change intended.
> >
> > Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
>
> Acked-by: George Dunlap <george.dunlap@citrix.com>
acked + applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-08 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 2:00 [PATCH] xl: use bool type for flags instead of int Dario Faggioli
2016-02-08 10:21 ` George Dunlap
2016-02-08 15:45 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).