Use the virStorageSourceIsEmpty helper to determine whether the drive
source is empty rather than checking for src->path. This will fix start
of VM with empty network cdrom that would not report any error.
*source = NULL;
+ /* return 1 for empty sources */
+ if (virStorageSourceIsEmpty(src))
+ return 1;
+
if (conn) {
if (actualType == VIR_STORAGE_TYPE_NETWORK &&
src->auth &&
case VIR_STORAGE_TYPE_BLOCK:
case VIR_STORAGE_TYPE_FILE:
case VIR_STORAGE_TYPE_DIR:
- if (!src->path) {
- ret = 1;
- goto cleanup;
- }
-
if (VIR_STRDUP(*source, src->path) < 0)
goto cleanup;