[libvirt] [PATCH] virsh: move version command to virsh group

Trivial patch, move version command to virsh commands group. It has no any related with any domain. It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT. --- diff --git a/tools/virsh.c b/tools/virsh.c index 02f2e0d..0166bc6 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -15641,7 +15641,6 @@ static const vshCmdDef domManagementCmds[] = { {"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0}, {"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0}, {"vcpupin", cmdVcpuPin, opts_vcpupin, info_vcpupin, 0}, - {"version", cmdVersion, opts_version, info_version, 0}, {"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0}, {NULL, NULL, NULL, NULL, 0} }; @@ -15810,6 +15809,7 @@ static const vshCmdDef secretCmds[] = { }; static const vshCmdDef virshCmds[] = { + {"version", cmdVersion, opts_version, info_version, 0}, {"cd", cmdCd, opts_cd, info_cd, VSH_CMD_FLAG_NOCONNECT}, {"echo", cmdEcho, opts_echo, info_echo, VSH_CMD_FLAG_NOCONNECT}, {"exit", cmdQuit, NULL, info_quit, VSH_CMD_FLAG_NOCONNECT},

On 2011年12月27日 16:59, Lai Jiangshan wrote:
Trivial patch, move version command to virsh commands group.
It has no any related with any domain.
It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT.
--- diff --git a/tools/virsh.c b/tools/virsh.c index 02f2e0d..0166bc6 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -15641,7 +15641,6 @@ static const vshCmdDef domManagementCmds[] = { {"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0}, {"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0}, {"vcpupin", cmdVcpuPin, opts_vcpupin, info_vcpupin, 0}, - {"version", cmdVersion, opts_version, info_version, 0}, {"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0}, {NULL, NULL, NULL, NULL, 0} }; @@ -15810,6 +15809,7 @@ static const vshCmdDef secretCmds[] = { };
static const vshCmdDef virshCmds[] = { + {"version", cmdVersion, opts_version, info_version, 0}, {"cd", cmdCd, opts_cd, info_cd, VSH_CMD_FLAG_NOCONNECT}, {"echo", cmdEcho, opts_echo, info_echo, VSH_CMD_FLAG_NOCONNECT}, {"exit", cmdQuit, NULL, info_quit, VSH_CMD_FLAG_NOCONNECT},
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
The change on the flag is right, but the "version" command should be in "Host and Hypervisor" group instead IMO. Regards, Osier

On 12/27/2011 08:40 PM, Osier Yang wrote:
On 2011年12月27日 16:59, Lai Jiangshan wrote:
Trivial patch, move version command to virsh commands group.
It has no any related with any domain.
It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT.
static const vshCmdDef virshCmds[] = { + {"version", cmdVersion, opts_version, info_version, 0}, {"cd", cmdCd, opts_cd, info_cd, VSH_CMD_FLAG_NOCONNECT},
The change on the flag is right, but the "version" command should be in "Host and Hypervisor" group instead IMO.
Agreed, as well as that it should be sorted. Pushed with this squashed in: diff --git i/tools/virsh.c w/tools/virsh.c index 0166bc6..b2d3968 100644 --- i/tools/virsh.c +++ w/tools/virsh.c @@ -15809,7 +15809,6 @@ static const vshCmdDef secretCmds[] = { }; static const vshCmdDef virshCmds[] = { - {"version", cmdVersion, opts_version, info_version, 0}, {"cd", cmdCd, opts_cd, info_cd, VSH_CMD_FLAG_NOCONNECT}, {"echo", cmdEcho, opts_echo, info_echo, VSH_CMD_FLAG_NOCONNECT}, {"exit", cmdQuit, NULL, info_quit, VSH_CMD_FLAG_NOCONNECT}, @@ -15856,6 +15855,7 @@ static const vshCmdDef hostAndHypervisorCmds[] = { info_qemu_monitor_command, 0}, {"sysinfo", cmdSysinfo, NULL, info_sysinfo, 0}, {"uri", cmdURI, NULL, info_uri, 0}, + {"version", cmdVersion, opts_version, info_version, 0}, {NULL, NULL, NULL, NULL, 0} }; -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Lai Jiangshan
-
Osier Yang