From: Peter Krempa Date: Mon, 19 Sep 2011 12:57:07 +0000 (+0200) Subject: virsh: doc: Fix supported driver types for attach-disk command X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2ad83bf4486d1475ba3f5c6903c8447dae4b1ba5;p=libvirt.git virsh: doc: Fix supported driver types for attach-disk command Virsh man page lists driver types to be used with attach-device command, but does not specify that those are usable only with the XEN Hypervisor. This patch adds statement, that those options specified are applicable only on the Xen hypervisor and adds option usable with qemu emulator. This patch also changes type of error returned by QEMU driver if the user specifies incompatible driver type from VIR_ERR_INTERNAL_ERROR to VIR_ERR_CONFIG_UNSUPPORTED. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 45d55fc508..ee4b52beb9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3657,7 +3657,7 @@ qemuBuildCommandLine(virConnectPtr conn, if (disk->driverName != NULL && !STREQ(disk->driverName, "qemu")) { - qemuReportError(VIR_ERR_INTERNAL_ERROR, + qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported driver name '%s' for disk '%s'"), disk->driverName, disk->src); goto error; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e2f428fbed..f4ee4c3f8f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5208,7 +5208,7 @@ qemuDomainAttachDeviceDiskLive(struct qemud_driver *driver, int ret = -1; if (disk->driverName != NULL && !STREQ(disk->driverName, "qemu")) { - qemuReportError(VIR_ERR_INTERNAL_ERROR, + qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported driver name '%s' for disk '%s'"), disk->driverName, disk->src); goto end; diff --git a/tools/virsh.pod b/tools/virsh.pod index 6529cd6920..88dee26607 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1184,7 +1184,8 @@ the single existing device; consider using B for this usage. Attach a new disk device to the domain. I and I are paths for the files and devices. -I can be I, I or I depending on the kind of access. +I can be I, I or I for the Xen hypervisor depending on +the kind of access; or I for the QEMU emulator. I can indicate I or I as alternative to the disk default, although this use only replaces the media within the existing virtual cdrom or floppy device; consider using B for this usage instead.