提交 5b05358a 编写于 作者: E Eric Blake

conf: use disk source accessors in xen/

Part of a series of cleanups to use new accessor methods.

* src/xen/xend_internal.c (virDomainXMLDevID): Use accessors.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 f6274687
/* /*
* xend_internal.c: access to Xen though the Xen Daemon interface * xend_internal.c: access to Xen though the Xen Daemon interface
* *
* Copyright (C) 2010-2013 Red Hat, Inc. * Copyright (C) 2010-2014 Red Hat, Inc.
* Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com> * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -3338,14 +3338,11 @@ virDomainXMLDevID(virConnectPtr conn, ...@@ -3338,14 +3338,11 @@ virDomainXMLDevID(virConnectPtr conn,
xenUnifiedPrivatePtr priv = conn->privateData; xenUnifiedPrivatePtr priv = conn->privateData;
char *xref; char *xref;
char *tmp; char *tmp;
const char *driver = virDomainDiskGetDriver(dev->data.disk);
if (dev->type == VIR_DOMAIN_DEVICE_DISK) { if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
if (dev->data.disk->driverName && if (STREQ_NULLABLE(driver, "tap") || STREQ_NULLABLE(driver, "tap2"))
STREQ(dev->data.disk->driverName, "tap")) strcpy(class, driver);
strcpy(class, "tap");
else if (dev->data.disk->driverName &&
STREQ(dev->data.disk->driverName, "tap2"))
strcpy(class, "tap2");
else else
strcpy(class, "vbd"); strcpy(class, "vbd");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册