diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index c30b136ef2..0390c710e6 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -3338,9 +3338,10 @@ virDomainXMLDevID(virConnectPtr conn, xenUnifiedPrivatePtr priv = conn->privateData; char *xref; char *tmp; - const char *driver = virDomainDiskGetDriver(dev->data.disk); if (dev->type == VIR_DOMAIN_DEVICE_DISK) { + const char *driver = virDomainDiskGetDriver(dev->data.disk); + if (STREQ_NULLABLE(driver, "tap") || STREQ_NULLABLE(driver, "tap2")) strcpy(class, driver); else