[libvirt] [PATCH 0/2] docs: move locations of 'send-key' and 'echo' command descriptions in virsh(1)

It seems that both 'send-key' and 'echo' command descriptions in virsh man page are put in wrong sections and the following patches fix these. -- Thanks, Satoru SATOH

Virsh's send-key command manipulates domains and its description should go into the domain commands section instead of generic commands section (current), IMHO. The following patch accomplish this. --- tools/virsh.pod | 162 +++++++++++++++++++++++++++--------------------------- 1 files changed, 81 insertions(+), 81 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 6c10245..36fedb7 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -322,87 +322,6 @@ running B<virsh suspend>. When in a paused state the domain will still consume allocated resources like memory, but will not be eligible for scheduling by the hypervisor. -=item B<send-key> I<domain-id> [I<--codeset> B<codeset>] -[I<--holdtime> B<holdtime>] I<keycode>... - -Parse the I<keycode> sequence as keystrokes to send to I<domain-id>. -Each I<keycode> can either be a numeric value or a symbolic name from -the corresponding codeset. If I<--holdtime> is given, each keystroke -will be held for that many milliseconds. The default codeset is -B<linux>, but use of the I<--codeset> option allows other codesets to -be chosen. - -=over 4 - -=item B<linux> - -The numeric values are those defined by the Linux generic input -event subsystem. The symbolic names match the corresponding -Linux key constant macro names. - -=item B<xt> - -The numeric values are those defined by the original XT keyboard -controller. No symbolic names are provided - -=item B<atset1> - -The numeric values are those defined by the AT keyboard controller, -set 1 (aka XT compatible set). Extended keycoes from B<atset1> -may differ from extended keycodes in the B<xt> codeset. No symbolic -names are provided - -=item B<atset2> - -The numeric values are those defined by the AT keyboard controller, -set 2. No symbolic names are provided - -=item B<atset3> - -The numeric values are those defined by the AT keyboard controller, -set 3 (aka PS/2 compatible set). No symbolic names are provided - -=item B<os_x> - -The numeric values are those defined by the OS-X keyboard input -subsystem. The symbolic names match the corresponding OS-X key -constant macro names - -=item B<xt_kbd> - -The numeric values are those defined by the Linux KBD device. -These are a variant on the original XT codeset, but often with -different encoding for extended keycodes. No symbolic names are -provided. - -=item B<win32> - -The numeric values are those defined by the Win32 keyboard input -subsystem. The symbolic names match the corresponding Win32 key -constant macro names - -=item B<usb> - -The numeric values are those defined by the USB HID specification -for keyboard input. No symbolic names are provided - -=item B<rfb> - -The numeric values are those defined by the RFB extension for sending -raw keycodes. These are a variant on the XT codeset, but extended -keycodes have the low bit of the second byte set, instead of the high -bit of the first byte. No symbolic names are provided. - -=back - -B<Examples> - # send three strokes 'k', 'e', 'y', using xt codeset - virsh send-key dom --codeset xt 37 18 21 - # send one stroke 'right-ctrl+C' - virsh send-key dom KEY_RIGHTCTRL KEY_C - # send a tab, held for 1 second - virsh send-key --holdtime 1000 0xf - =item B<shutdown> The domain is in the process of shutting down, i.e. the guest operating system @@ -1017,6 +936,87 @@ of screen. In case of multiple graphics cards, heads are enumerated before devices, e.g. having two graphics cards, both with four heads, screen ID 5 addresses the second head on the second card. +=item B<send-key> I<domain-id> [I<--codeset> B<codeset>] +[I<--holdtime> B<holdtime>] I<keycode>... + +Parse the I<keycode> sequence as keystrokes to send to I<domain-id>. +Each I<keycode> can either be a numeric value or a symbolic name from +the corresponding codeset. If I<--holdtime> is given, each keystroke +will be held for that many milliseconds. The default codeset is +B<linux>, but use of the I<--codeset> option allows other codesets to +be chosen. + +=over 4 + +=item B<linux> + +The numeric values are those defined by the Linux generic input +event subsystem. The symbolic names match the corresponding +Linux key constant macro names. + +=item B<xt> + +The numeric values are those defined by the original XT keyboard +controller. No symbolic names are provided + +=item B<atset1> + +The numeric values are those defined by the AT keyboard controller, +set 1 (aka XT compatible set). Extended keycoes from B<atset1> +may differ from extended keycodes in the B<xt> codeset. No symbolic +names are provided + +=item B<atset2> + +The numeric values are those defined by the AT keyboard controller, +set 2. No symbolic names are provided + +=item B<atset3> + +The numeric values are those defined by the AT keyboard controller, +set 3 (aka PS/2 compatible set). No symbolic names are provided + +=item B<os_x> + +The numeric values are those defined by the OS-X keyboard input +subsystem. The symbolic names match the corresponding OS-X key +constant macro names + +=item B<xt_kbd> + +The numeric values are those defined by the Linux KBD device. +These are a variant on the original XT codeset, but often with +different encoding for extended keycodes. No symbolic names are +provided. + +=item B<win32> + +The numeric values are those defined by the Win32 keyboard input +subsystem. The symbolic names match the corresponding Win32 key +constant macro names + +=item B<usb> + +The numeric values are those defined by the USB HID specification +for keyboard input. No symbolic names are provided + +=item B<rfb> + +The numeric values are those defined by the RFB extension for sending +raw keycodes. These are a variant on the XT codeset, but extended +keycodes have the low bit of the second byte set, instead of the high +bit of the first byte. No symbolic names are provided. + +=back + +B<Examples> + # send three strokes 'k', 'e', 'y', using xt codeset + virsh send-key dom --codeset xt 37 18 21 + # send one stroke 'right-ctrl+C' + virsh send-key dom KEY_RIGHTCTRL KEY_C + # send a tab, held for 1 second + virsh send-key --holdtime 1000 0xf + =item B<setmem> I<domain-id> B<kilobytes> [[I<--config>] [I<--live>] | [I<--current>]] -- 1.7.7.4

On 2011年12月26日 01:08, Satoru SATOH wrote:
Virsh's send-key command manipulates domains and its description should go into the domain commands section instead of generic commands section (current), IMHO.
The following patch accomplish this.
Right, Actually you will see "send-key" is foldered into "Domain Management" in the output of "virsh help". ACK and pushed. Regards, Osier

Virsh's echo command looks not having any relations with domains and its description should go into the generic commands section instead of the domain commands section (current), IMHO. The following patch do this. --- tools/virsh.pod | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 36fedb7..4e29421 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -373,6 +373,13 @@ guest CPU definition is the <cpu> element and its contents from domain XML definition. For more information on guest CPU definition see: L<http://libvirt.org/formatdomain.html#elementsCPU> +=item B<echo> [I<--shell>] [I<--xml>] [I<arg>...] + +Echo back each I<arg>, separated by space. If I<--shell> is +specified, then the output will be single-quoted where needed, so that +it is suitable for reuse in a shell context. If I<--xml> is +specified, then the output will be escaped for use in XML. + =back =head1 DOMAIN COMMANDS @@ -632,13 +639,6 @@ Using I<--security-info> will also include security sensitive information in the XML dump. I<--update-cpu> updates domain CPU requirements according to host CPU. -=item B<echo> [I<--shell>] [I<--xml>] [I<arg>...] - -Echo back each I<arg>, separated by space. If I<--shell> is -specified, then the output will be single-quoted where needed, so that -it is suitable for reuse in a shell context. If I<--xml> is -specified, then the output will be escaped for use in XML. - =item B<edit> I<domain-id> Edit the XML configuration file for a domain, which will affect the -- 1.7.7.4

On 2011年12月26日 01:20, Satoru SATOH wrote:
Virsh's echo command looks not having any relations with domains and its description should go into the generic commands section instead of the domain commands section (current), IMHO.
The following patch do this.
The commands categorization in virsh.pod is not consistent with in virsh help. Command "echo" should be in the group "virsh itself" instead. We need to clean up the virsh.pod. But anyway it's right to move "echo" out from "DOMAIN COMMANDS" section. We can do the clean up in later patches. ACK and pushed. Regards, Osier
participants (2)
-
Osier Yang
-
Satoru SATOH