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

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

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. */
-        qemuReportError(VIR_ERR_INTERNAL_ERROR, "Unknown controller
type: %s\n",
+        qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                        _("Unknown controller type: %s"),
         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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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