[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xl: output illegal option character
# HG changeset patch # User Andre Przywara <andre.przywara@xxxxxxx> # Date 1296587151 0 # Node ID 0db82ae4b4469eee91e59237691d3095dd6b75a6 # Parent a69965e61ae9f786e96094bf9bde7600cd537691 xl: output illegal option character Though illegal characters on xl command lines are catched, the user isn't currently informed which one was not right. This patch fixes this by printing the faulting character. Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 54 +++++++++++++++++++++++------------------------ 1 files changed, 27 insertions(+), 27 deletions(-) diff -r a69965e61ae9 -r 0db82ae4b446 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon Jan 31 17:47:24 2011 +0000 +++ b/tools/libxl/xl_cmdimpl.c Tue Feb 01 19:05:51 2011 +0000 @@ -1762,7 +1762,7 @@ int main_memmax(int argc, char **argv) help("mem-max"); exit(0); default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -1809,7 +1809,7 @@ int main_memset(int argc, char **argv) help("mem-set"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -1875,7 +1875,7 @@ int main_cd_eject(int argc, char **argv) help("cd-eject"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -1903,7 +1903,7 @@ int main_cd_insert(int argc, char **argv help("cd-insert"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -1944,7 +1944,7 @@ int main_console(int argc, char **argv) num = atoi(optarg); break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -1993,7 +1993,7 @@ int main_vncviewer(int argc, char **argv help("vncviewer"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2032,7 +2032,7 @@ int main_pcilist_assignable(int argc, ch help("pci-list-assignable-devices"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2069,7 +2069,7 @@ int main_pcilist(int argc, char **argv) help("pci-list"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2114,7 +2114,7 @@ int main_pcidetach(int argc, char **argv force = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2155,7 +2155,7 @@ int main_pciattach(int argc, char **argv help("pci-attach"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2816,7 +2816,7 @@ int main_restore(int argc, char **argv) help("restore"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2865,7 +2865,7 @@ int main_migrate_receive(int argc, char debug = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2894,7 +2894,7 @@ int main_save(int argc, char **argv) help("save"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2938,7 +2938,7 @@ int main_migrate(int argc, char **argv) debug = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -2998,7 +2998,7 @@ int main_pause(int argc, char **argv) help("pause"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3025,7 +3025,7 @@ int main_unpause(int argc, char **argv) help("unpause"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3051,7 +3051,7 @@ int main_destroy(int argc, char **argv) help("destroy"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3081,7 +3081,7 @@ int main_shutdown(int argc, char **argv) wait = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3107,7 +3107,7 @@ int main_reboot(int argc, char **argv) help("reboot"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3153,7 +3153,7 @@ int main_list(int argc, char **argv) verbose = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3204,7 +3204,7 @@ int main_list_vm(int argc, char **argv) help("list-vm"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3262,7 +3262,7 @@ int main_create(int argc, char **argv) quiet = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -3328,7 +3328,7 @@ int main_button_press(int argc, char **a help("button-press"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -4103,7 +4103,7 @@ int main_debug_keys(int argc, char **arg help("debug-keys"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -4138,7 +4138,7 @@ int main_dmesg(int argc, char **argv) help("dmesg"); return 0; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -5219,7 +5219,7 @@ int main_cpupoolcreate(int argc, char ** dryrun = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } @@ -5416,7 +5416,7 @@ int main_cpupoollist(int argc, char **ar opt_cpus = 1; break; default: - fprintf(stderr, "option not supported\n"); + fprintf(stderr, "option `%c' not supported.\n", optopt); break; } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |