]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: doc: Fix supported driver types for attach-disk command
authorPeter Krempa <pkrempa@redhat.com>
Mon, 19 Sep 2011 12:57:07 +0000 (14:57 +0200)
committerEric Blake <eblake@redhat.com>
Mon, 19 Sep 2011 22:54:13 +0000 (16:54 -0600)
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.

src/qemu/qemu_command.c
src/qemu/qemu_driver.c
tools/virsh.pod

index 45d55fc50814ca196f9f3a6f628c26a5931209e1..ee4b52beb95ff5333e842c91295fad2728af78f5 100644 (file)
@@ -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;
index e2f428fbed67982f40431d7711599aacf321ad01..f4ee4c3f8f9e8bc907049a5264ed80d65d83bd39 100644 (file)
@@ -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;
index 6529cd6920316265fb8d6d6f207c81b3a49881e5..88dee266070ccda4870b2312af01dd5bd79d4ce2 100644 (file)
@@ -1184,7 +1184,8 @@ the single existing device; consider using B<update-device> for this usage.
 
 Attach a new disk device to the domain.
 I<source> and I<target> are paths for the files and devices.
-I<driver> can be I<file>, I<tap> or I<phy> depending on the kind of access.
+I<driver> can be I<file>, I<tap> or I<phy> for the Xen hypervisor depending on
+the kind of access; or I<qemu> for the QEMU emulator.
 I<type> can indicate I<cdrom> or I<floppy> as alternative to the disk default,
 although this use only replaces the media within the existing virtual cdrom or
 floppy device; consider using B<update-device> for this usage instead.