qemu: hotplug: Use checker function to check if disk is empty

This commit is contained in:
Peter Krempa 2015-03-12 16:57:56 +01:00
parent f4b5f53027
commit e7974b4f80

View File

@ -222,7 +222,7 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
goto error; goto error;
} }
if (!virStorageSourceIsLocalStorage(newsrc) || newsrc->path) { if (!virStorageSourceIsEmpty(newsrc)) {
if (qemuGetDriveSourceString(newsrc, conn, &sourcestr) < 0) if (qemuGetDriveSourceString(newsrc, conn, &sourcestr) < 0)
goto error; goto error;