From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 4/5] xl: Command line: Make COMMON_LONG_OPTS include sentinel
Date: Fri, 17 Jul 2015 18:00:50 +0100 [thread overview]
Message-ID: <1437152451-22507-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1437152451-22507-1-git-send-email-ian.jackson@eu.citrix.com>
No functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
tools/libxl/xl_cmdimpl.c | 51 ++++++++++++++++------------------------------
1 file changed, 18 insertions(+), 33 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 803c627..1fa98e6 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3025,7 +3025,8 @@ static int64_t parse_mem_size_kb(const char *mem)
return kbytes;
}
-#define COMMON_LONG_OPTS {"help", 0, 0, 'h'}
+#define COMMON_LONG_OPTS {"help", 0, 0, 'h'}, \
+ {0, 0, 0, 0}
/*
* Callers should use SWITCH_FOREACH_OPT in preference to calling this
@@ -3038,8 +3039,7 @@ static int def_getopt(int argc, char * const argv[],
{
int opt;
const struct option def_options[] = {
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
if (!longopts)
@@ -3305,8 +3305,7 @@ int main_vncviewer(int argc, char **argv)
static const struct option opts[] = {
{"autopass", 0, 0, 'a'},
{"vncviewer-autopass", 0, 0, 'a'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
uint32_t domid;
int opt, autopass = 0;
@@ -4439,8 +4438,7 @@ int main_restore(int argc, char **argv)
static struct option opts[] = {
{"vncviewer", 0, 0, 'V'},
{"vncviewer-autopass", 0, 0, 'A'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "FcpdeVA", opts, "restore", 1) {
@@ -4572,8 +4570,7 @@ int main_migrate(int argc, char **argv)
static struct option opts[] = {
{"debug", 0, 0, 0x100},
{"live", 0, 0, 0x200},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "FC:s:e", opts, "migrate", 2) {
@@ -4695,8 +4692,7 @@ static int main_shutdown_or_reboot(int do_reboot, int argc, char **argv)
static struct option opts[] = {
{"all", 0, 0, 'a'},
{"wait", 0, 0, 'w'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "awF", opts, what, 0) {
@@ -4776,8 +4772,7 @@ int main_list(int argc, char **argv)
{"context", 0, 0, 'Z'},
{"cpupool", 0, 0, 'c'},
{"numa", 0, 0, 'n'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
libxl_dominfo info_buf;
@@ -4883,8 +4878,7 @@ int main_create(int argc, char **argv)
{"defconfig", 1, 0, 'f'},
{"vncviewer", 0, 0, 'V'},
{"vncviewer-autopass", 0, 0, 'A'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
dom_info.extra_config = NULL;
@@ -4977,8 +4971,7 @@ int main_config_update(int argc, char **argv)
int debug = 0;
static struct option opts[] = {
{"defconfig", 1, 0, 'f'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
if (argc < 2) {
@@ -5584,8 +5577,7 @@ int main_info(int argc, char **argv)
int opt;
static struct option opts[] = {
{"numa", 0, 0, 'n'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
int numa = 0;
@@ -5923,8 +5915,7 @@ int main_sched_credit(int argc, char **argv)
{"tslice_ms", 1, 0, 't'},
{"ratelimit_us", 1, 0, 'r'},
{"cpupool", 1, 0, 'p'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "d:w:c:p:t:r:s", opts, "sched-credit", 0) {
@@ -6039,8 +6030,7 @@ int main_sched_credit2(int argc, char **argv)
{"domain", 1, 0, 'd'},
{"weight", 1, 0, 'w'},
{"cpupool", 1, 0, 'p'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "d:w:p:", opts, "sched-credit2", 0) {
@@ -6112,8 +6102,7 @@ int main_sched_rtds(int argc, char **argv)
{"period", 1, 0, 'p'},
{"budget", 1, 0, 'b'},
{"cpupool", 1, 0, 'c'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "d:p:b:c:", opts, "sched-rtds", 0) {
@@ -7181,8 +7170,7 @@ int main_cpupoolcreate(int argc, char **argv)
static struct option opts[] = {
{"defconfig", 1, 0, 'f'},
{"dryrun", 0, 0, 'n'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
int ret;
char *config_data = 0;
@@ -7382,8 +7370,7 @@ int main_cpupoollist(int argc, char **argv)
int opt;
static struct option opts[] = {
{"cpus", 0, 0, 'c'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
int opt_cpus = 0;
const char *pool = NULL;
@@ -8394,8 +8381,7 @@ int main_psr_cat_cbm_set(int argc, char **argv)
static struct option opts[] = {
{"socket", 1, 0, 's'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
libxl_socket_bitmap_alloc(ctx, &target_map, 0);
@@ -8462,8 +8448,7 @@ int main_psr_hwinfo(int argc, char **argv)
static struct option opts[] = {
{"cmt", 0, 0, 'm'},
{"cat", 0, 0, 'a'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
SWITCH_FOREACH_OPT(opt, "ma", opts, "psr-hwinfo", 0) {
--
1.7.10.4
next prev parent reply other threads:[~2015-07-17 17:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 17:00 [PATCH 1/5] xl: Command line: Adjust "Fix segfaults from `xl psr-cat-cbm-set`..." Ian Jackson
2015-07-17 17:00 ` [PATCH 2/5] xl: Command line: Remove maximum argument limit for network-attach Ian Jackson
2015-07-20 10:00 ` Wei Liu
2015-07-17 17:00 ` [PATCH 3/5] xl: Command line: Support -h everywhere Ian Jackson
2015-07-20 10:06 ` Wei Liu
2015-07-17 17:00 ` Ian Jackson [this message]
2015-07-17 17:09 ` [PATCH 4/5] xl: Command line: Make COMMON_LONG_OPTS include sentinel Andrew Cooper
2015-07-17 17:11 ` Ian Jackson
2015-07-24 11:06 ` Ian Campbell
2015-07-17 17:00 ` [PATCH 5/5] xl: Command line: Support xl vcpu-set --help Ian Jackson
2015-07-20 10:07 ` Wei Liu
2015-07-17 17:04 ` [PATCH 1/5] xl: Command line: Adjust "Fix segfaults from `xl psr-cat-cbm-set`..." Andrew Cooper
2015-07-21 14:16 ` Ian Campbell
2015-07-21 14:27 ` Ian Jackson
2015-07-21 14:36 ` Wei Liu
2015-07-21 15:26 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437152451-22507-4-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).