diff options
author | Sander Eikelenboom <linux@eikelenboom.it> | 2012-10-11 11:52:09 +0100 |
---|---|---|
committer | Sander Eikelenboom <linux@eikelenboom.it> | 2012-10-11 11:52:09 +0100 |
commit | 4868f24fa056da59657d0e07ae0ab0c6b46bcadf (patch) | |
tree | 62ed1af7c1a2b3df9a85f30ee9ddddb24f3634a1 /tools/libxl/xl_cmdimpl.c | |
parent | 29be730ec77c6ed3ef964131cce72db632b29d1f (diff) | |
download | xen-4868f24fa056da59657d0e07ae0ab0c6b46bcadf.tar.gz xen-4868f24fa056da59657d0e07ae0ab0c6b46bcadf.tar.bz2 xen-4868f24fa056da59657d0e07ae0ab0c6b46bcadf.zip |
xl/libxl: make shutdown accept the long option --wait for -w
Make xl/libxl accept the long option --wait for -w to be compatible with xm.
The long options are used in the default init and sysconfig scripts.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/xl_cmdimpl.c')
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 93066d3e3c..389b5f7e4a 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3709,8 +3709,12 @@ int main_shutdown(int argc, char **argv) int opt; int wait_for_it = 0; int fallback_trigger = 0; + static struct option long_options[] = { + {"wait", 0, 0, 'w'}, + {0, 0, 0, 0} + }; - while ((opt = def_getopt(argc, argv, "wF", "shutdown", 1)) != -1) { + while ((opt = getopt_long(argc, argv, "wF", long_options, NULL)) != -1) { switch (opt) { case 0: case 2: return opt; |