Fix internals of libvirt for new storage volume type.
Libvirt reported an invalid type of the volume.
BZ #727088
typedef enum {
VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes */
VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */
+ VIR_STORAGE_VOL_DIR = 2, /* Directory-passthrough based volume */
} virStorageVolType;
typedef enum {
goto cleanup;
}
+ /* directory based volume */
+ if (vol->target.format == VIR_STORAGE_FILE_DIR)
+ vol->type = VIR_STORAGE_VOL_DIR;
+
if (backingStore != NULL) {
vol->backingStore.path = backingStore;
vol->backingStore.format = backingStoreFormat;