mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
storage: Set correct vol->type at VolCreate
https://bugzilla.redhat.com/show_bug.cgi?id=1227664 If the requested format type for the new entry in the file system pool is a 'dir', then be sure to set the vol->type correctly as would be done when the pool is refreshed.
This commit is contained in:
parent
bb66d93c11
commit
e66a4c0b53
@ -1051,7 +1051,10 @@ virStorageBackendFileSystemVolCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virStorageVolDefPtr vol)
|
||||
{
|
||||
|
||||
vol->type = VIR_STORAGE_VOL_FILE;
|
||||
if (vol->target.format == VIR_STORAGE_FILE_DIR)
|
||||
vol->type = VIR_STORAGE_VOL_DIR;
|
||||
else
|
||||
vol->type = VIR_STORAGE_VOL_FILE;
|
||||
|
||||
VIR_FREE(vol->target.path);
|
||||
if (virAsprintf(&vol->target.path, "%s/%s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user