Fix -h option of xm command
PATCH 1/1 Fix -h option of xm command
Hi,
The '-h' option was disabled in changeset:11572. Currently, help messages are not shown, or error messages are shown.
# xm create -h # xm reboot -h # xm shutdown -h # xm migrate -h Error: Invalid number of arguments Usage: xm migrate <Domain> <Host>
Migrate a domain to another machine.
Options:
-h, --help Print this help.
-l, --live Use live migration.
-p=portnum, --port=portnum
Use specified port for migration.
-r=MBIT, --resource=MBIT
Set level of resource usage for migration.
This patch enables the '-h' option of xm command.
Best regards,
Kan
tools/python/xen/xm/main.py +8 -7
@@ -1419,13 +1419,14 @@ def main(argv=sys.argv): if len(argv) < 2: usage() - # intercept --help and output our own help - if '--help' in argv[1:]: - if '--help' == argv[1]: - longHelp() - else: - usage(argv[1]) - sys.exit(0) + # intercept --help(-h) and output our own help + for help in ['--help', '-h']: + if help in argv[1:]: + if help == argv[1]: + longHelp() + else: + usage(argv[1]) + sys.exit(0) cmd = xm_lookup_cmd(argv[1])
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
Could you comment this patch?
You don't remove the '-h' option, do it?
Best regards,
Kan
Quoted 37 lines
Hi,
The '-h' option was disabled in changeset:11572. Currently, help messages are not shown, or error messages are shown.
# xm create -h # xm reboot -h # xm shutdown -h # xm migrate -h Error: Invalid number of arguments Usage: xm migrate <Domain> <Host>Migrate a domain to another machine.
Options:
(quoted diff) +0
-4-h, --help Print this help. -l, --live Use live migration. -p=portnum, --port=portnum Use specified port for migration. -r=MBIT, --resource=MBIT Set level of resource usage for migration.This patch enables the '-h' option of xm command.
Signed-off-by Masaki Kanno <[email protected]>Best regards,
Kan-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel