]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Report error when parsing character device target type
authorJim Fehlig <jfehlig@suse.com>
Wed, 9 May 2012 17:12:38 +0000 (11:12 -0600)
committerJim Fehlig <jfehlig@suse.com>
Wed, 9 May 2012 17:12:38 +0000 (11:12 -0600)
commit10a87145f73068e572d14d82a13df46c95960273
treec9f59d14fe4e83134915b15775f657d8bffc6ac9
parentd9d39e620989d2439b0c48e22acf0c4bc6ef83dc
Report error when parsing character device target type

No useful error was being reported when an invalid character device
target type is specified in the domainXML. E.g.

    ...
    <console type="pty">
      <source path="/dev/pts/2"/>
      <target type="kvm" port="0"/>
    </console>
    ...

resulted in

error: Failed to define domain from x.xml
error: An error occurred, but the cause is unknown

With this small patch, the error is more helpful

error: Failed to define domain from x.xml
error: XML error: unknown target type 'kvm' specified for character device
src/conf/domain_conf.c