return kbytes;
}
-#define COMMON_LONG_OPTS {"help", 0, 0, 'h'}
+/* Must be last in list */
+#define COMMON_LONG_OPTS {"help", 0, 0, 'h'}, \
+ {0, 0, 0, 0}
/*
* Callers should use SWITCH_FOREACH_OPT in preference to calling this
{
int opt;
const struct option def_options[] = {
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
if (!longopts)
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;
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) {
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) {
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) {
{"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;
{"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;
int debug = 0;
static struct option opts[] = {
{"defconfig", 1, 0, 'f'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
if (argc < 2) {
int opt;
static struct option opts[] = {
{"numa", 0, 0, 'n'},
- COMMON_LONG_OPTS,
- {0, 0, 0, 0}
+ COMMON_LONG_OPTS
};
int numa = 0;
{"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) {
{"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) {
{"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) {
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;
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;
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);
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) {