[libvirt] [PATCH 1/5] character device: Allow character devices to have different target types
Daniel Veillard
veillard at redhat.com
Thu Nov 5 13:29:59 UTC 2009
On Wed, Nov 04, 2009 at 04:21:58PM +0000, Matthew Booth wrote:
> Currently a character device's target (it's interface in the guest) has only a
> single property: port. This patch is in preparation for adding targets which
> require other properties.
>
> Target properties are moved into a union in virDomainChrDef, and a targetType
> field is added to identify which union member should be used. All current code
> which touches a virDomainChrDef is updated both to use the new union field,
> and to populate targetType if necessary.
[...]
> @@ -1338,6 +1346,21 @@ virDomainChrDefParseXML(virConnectPtr conn,
> else if ((def->type = virDomainChrTypeFromString(type)) < 0)
> def->type = VIR_DOMAIN_CHR_TYPE_NULL;
>
> + targetType = (const char *) node->name;
> + if (targetType == NULL) {
> + /* Shouldn't be possible */
> + virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
> + "node->name is NULL at %s:%i",
> + __FILE__, __LINE__);
> + return NULL;
> + }
I'm just fixing this diagnostic error as it's not localized and
FILE and LINES are provided automatically, instead I'm adding the
function name,
otherwise looks fine, so applied
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list