aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/xl.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-08-24 18:29:21 +0100
committerIan Campbell <ian.campbell@citrix.com>2010-08-24 18:29:21 +0100
commit763cad85585b22925912f38f94ed89e18e115920 (patch)
tree585ea7367f11bbf99db91bc2b8ba450003be9ff6 /tools/libxl/xl.c
parent86316089e4611c19d3b53c16f0ace532ef24a576 (diff)
downloadxen-763cad85585b22925912f38f94ed89e18e115920.tar.gz
xen-763cad85585b22925912f38f94ed89e18e115920.tar.bz2
xen-763cad85585b22925912f38f94ed89e18e115920.zip
xl: correct argument parsing for some sub-commands.
XL sub-commands are expected to parse their arguments relative to the global variable "optind" rather than treating argc+argv as zero based. This is because the argc+argv passed to sub-commands include the entire original command line, not just the sub command specific bits. Not all commands do this and they are therefore broken if the user uses "xl -v command", correct such problems dump-core: - did not handle "-h" option. {network,network2,block}-{attach,list,detach} : - handled arguments without reference to optind - checked number of arguments before processing getopt loop, breaking "-h" option handling An example of the breakage: # xl -v block-list d32-2 Vdev BE handle state evt-ch ring-ref BE-path block-list is an invalid domain identifier 51712 0 1 4 13 8 /local/domain/0/backend/vbd/1/ Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/xl.c')
0 files changed, 0 insertions, 0 deletions