qemu_api: doc improvements

The new doc text had a few readability issues.  Also, the
monitor command text copied a bit too much from the attach case.

* src/libvirt-qemu.c (virDomainQemuMonitorCommand)
(virDomainQemuAttach): Fix typos and grammar.
This commit is contained in:
Eric Blake 2011-09-14 09:49:08 -06:00
parent b4a01cecd6
commit 69d8c75333

View File

@ -43,32 +43,27 @@
* @result: a string returned by @cmd * @result: a string returned by @cmd
* @flags: bitwise-or of supported virDomainQemuMonitorCommandFlags * @flags: bitwise-or of supported virDomainQemuMonitorCommandFlags
* *
* This API is QEMU specific, so will only work with hypervisor * This API is QEMU specific, so it will only work with hypervisor
* connections to the QEMU driver. * connections to the QEMU driver.
* *
* Send an arbitrary monitor command @cmd to @domain through the * Send an arbitrary monitor command @cmd to @domain through the
* qemu monitor. There are several requirements to safely and * qemu monitor. There are several requirements to safely and
* succcesfully to use this API: * successfully use this API:
* *
* - It must have been started with a monitor socket using the UNIX * - A @cmd that queries state without making any modifications is safe
* domain socket protocol. * - A @cmd that alters state that is also tracked by libvirt is unsafe,
* - No other operations which are changing the domain state or * and may cause libvirtd to crash
* configuration at the same time, e.g. domain saving, it might * - A @cmd that alters state not tracked by the current version of
* cause libvirtd crashed. * libvirt is possible as a means to test new qemu features before
* - If the @cmd is intend to change domain configuration, it must * they have support in libvirt, but no guarantees are made to safety
* be no or other configuration changes can have been made via
* the monitor since it started.
* - The '-name' and '-uuid' arguments should have been set (not
* mandatory, but strongly recommended)
* *
* If VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP is set, the command is * If VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP is set, the command is
* considered to be a human monitor command and libvirt will automatically * considered to be a human monitor command and libvirt will automatically
* convert it into QMP if needed. In that case the @result will also * convert it into QMP if needed. In that case the @result will also
* be converted back from QMP. * be converted back from QMP.
* *
* If successful, @result will be filled as a string with the output * If successful, @result will be filled with the string output of the
* of the @cmd. And other APIs should operate normally (provided the * @cmd, and the caller must free this string.
* above requirements were honoured
* *
* Returns 0 in case of success, -1 in case of failure * Returns 0 in case of success, -1 in case of failure
* *
@ -124,11 +119,11 @@ error:
* @pid: the UNIX process ID of the external QEMU process * @pid: the UNIX process ID of the external QEMU process
* @flags: optional flags, currently unused * @flags: optional flags, currently unused
* *
* This API is QEMU specific, so will only work with hypervisor * This API is QEMU specific, so it will only work with hypervisor
* connections to the QEMU driver. * connections to the QEMU driver.
* *
* This API will attach to an externally launched QEMU process * This API will attach to an externally launched QEMU process
* identified by @pid. There are several requirements to succcesfully * identified by @pid. There are several requirements to successfully
* attach to an external QEMU process: * attach to an external QEMU process:
* *
* - It must have been started with a monitor socket using the UNIX * - It must have been started with a monitor socket using the UNIX
@ -140,7 +135,7 @@ error:
* *
* If successful, then the guest will appear in the list of running * If successful, then the guest will appear in the list of running
* domains for this connection, and other APIs should operate * domains for this connection, and other APIs should operate
* normally (provided the above requirements were honoured * normally (provided the above requirements were honored).
* *
* Returns a new domain object on success, NULL otherwise * Returns a new domain object on success, NULL otherwise
*/ */