Re: [PATCH] Report error more accurate if failes on attaching device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/27/2011 08:14 PM, Eric Blake wrote:
> s/error more accurate if failes on attaching/more accurate error on
> failure to attach/
> 
> On 01/27/2011 12:21 AM, Hu Tao wrote:
>> When attaching device from a xml file and the device is mis-configured,
>> virsh gives mis-leading message "out of memory". This patch fixes this.
> 
> And if you got an actual out of memory condition, you could get the
> error message twice (once in callee, once in caller).  ACK and pushed.

I also squashed this in (the error is user-visible, so it needs to be
translated and not use INTERNAL_ERROR).

diff --git c/src/qemu/qemu_command.c i/src/qemu/qemu_command.c
index 4064e65..1ce8941 100644
--- c/src/qemu/qemu_command.c
+++ i/src/qemu/qemu_command.c
@@ -1496,7 +1496,8 @@
qemuBuildControllerDevStr(virDomainControllerDefPtr def)
     /* We always get an IDE controller, whether we want it or not. */
     case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
     default:
-        qemuReportError(VIR_ERR_INTERNAL_ERROR, "Unknown controller
type: %s\n",
+        qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                        _("Unknown controller type: %s"),
                         virDomainControllerTypeToString(def->type));
         goto error;
     }


'make syntax-check' would have caught this, except that commit caa805ea
(Feb 2010) renamed the function without updating cfg.mk.  And fixing
that caught a lot more, too; followup patch coming soon (under the
build-breaker rule).

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]