xl: rename "list-vm" command to "vm-list"
PATCH 1/1 xl: rename "list-vm" command to "vm-list"
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".
tools/libxl/xl.h +1 -1
@@ -54,7 +54,7 @@ int main_destroy(int argc, char **argv);int main_shutdown (int argc,char **argv);int main_reboot (int argc,char **argv);int main_list (int argc,char **argv); -int main_list_vm (int argc,char **argv); +int main_vm_list (int argc,char **argv);int main_create (int argc,char **argv);int main_config_update (int argc,char **argv);int main_button_press (int argc,char **argv);
tools/libxl/xl_cmdimpl.c +2 -2
@@ -3623,11 +3623,11 @@ int main_list(int argc, char **argv)return 0 ; } -int main_list_vm (int argc,char **argv) +int main_vm_list (int argc,char **argv) {int opt; -if ((opt =def_getopt (argc, argv,"" ,"list-vm" ,0 )) !=-1 ) +if ((opt =def_getopt (argc, argv,"" ,"vm-list" ,0 )) !=-1 )return opt;list_vm ();
tools/libxl/xl_cmdtable.c +3 -3
@@ -214,9 +214,9 @@ struct cmd_spec cmd_table[] = {"Set the number of active VCPUs allowed for the domain" ,"<Domain> <vCPUs>" , }, - { "list-vm", - &main_list_vm,0 ,0 , -"List the VMs,without DOM0" , + { "vm-list", + &main_vm_list,0 ,0 , +"List the VMs, without DOM0" ,"" , }, { "info",
Quoted 5 lines · Matt Wilson
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".
Which did xm have list-vm or vm-list (or neither?)
Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.
Quoted 48 lines
Signed-off-by Matt Wilson <[email protected]>diff -r
32034d1914a6-r34e47ba2612etools/libxl/xl.htools/libxl/xl.h +1
-1@@ -54,7 +54,7 @@ int main_destroy(int argc, char **argv);int main_shutdown (int argc,char **argv);int main_reboot (int argc,char **argv);int main_list (int argc,char **argv); -int main_list_vm (int argc,char **argv); +int main_vm_list (int argc,char **argv);int main_create (int argc,char **argv);int main_config_update (int argc,char **argv);int main_button_press (int argc,char **argv);diff -r
32034d1914a6-r34e47ba2612etools/libxl/xl_cmdimpl.ctools/libxl/xl_cmdimpl.c +2
-2@@ -3623,11 +3623,11 @@ int main_list(int argc, char **argv)return 0 ; } -int main_list_vm (int argc,char **argv) +int main_vm_list (int argc,char **argv) {int opt; -if ((opt =def_getopt (argc, argv,"" ,"list-vm" ,0 )) !=-1 ) +if ((opt =def_getopt (argc, argv,"" ,"vm-list" ,0 )) !=-1 )return opt;list_vm ();diff -r
32034d1914a6-r34e47ba2612etools/libxl/xl_cmdtable.ctools/libxl/xl_cmdtable.c +3
-3@@ -214,9 +214,9 @@ struct cmd_spec cmd_table[] = {"Set the number of active VCPUs allowed for the domain" ,"<Domain> <vCPUs>" , }, - { "list-vm", - &main_list_vm,0 ,0 , -"List the VMs,without DOM0" , + { "vm-list", + &main_vm_list,0 ,0 , +"List the VMs, without DOM0" ,"" , }, { "info",
Quoted 8 lines · Ian Campbell
Quoted 5 lines · Matt Wilson
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".Which did xm have list-vm or vm-list (or neither?)
Neither.
Quoted 4 lines
Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.
That would definitely be nice to have.
Matt
Quoted 11 lines · Matt Wilson
Quoted 8 lines · Ian Campbell
Quoted 5 lines · Matt Wilson
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".Which did xm have list-vm or vm-list (or neither?)
Neither.
In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)
Ian.
Quoted 9 lines
Quoted 5 lines
Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.
That would definitely be nice to have.
Matt
Quoted 7 lines · Ian Campbell
Quoted 7 lines
Quoted 7 lines · Matt Wilson
Quoted 5 lines
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Which did xm have list-vm or vm-list (or neither?)
Neither.
In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)
I grepped for list-vm in the whole xen source tree, trying to make sure that I updated any corresponding docs. I guess that means I didn't notice it not being documented at all. :-P
v2 in a moment.
Matt
Quoted 12 lines · Matt Wilson
Quoted 11 lines · Ian Campbell
Quoted 10 lines
Quoted 8 lines · Matt Wilson
Quoted 5 lines
All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".Which did xm have list-vm or vm-list (or neither?)
Neither.
Quoted 7 lines
Quoted 3 lines
In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)
I grepped for list-vm in the whole xen source tree, trying to make sure that I updated any corresponding docs. I guess that means I didn't notice it not being documented at all. :-P
I only double checked because I'm pretty sure xl.pod.1 was started with a grep over xl_cmdtable.c so I can't see how we missed it...
Quoted 1 line
v2 in a moment.
Thanks!