mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage_file: Add a new flag to mark backing files that are safe to probe
Signed-off-by: Adam Litke <agl@us.ibm.com>
This commit is contained in:
parent
5dca07e272
commit
fd93d46642
@ -8230,6 +8230,10 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
|
||||
if (format == VIR_STORAGE_FILE_AUTO &&
|
||||
!allowProbing)
|
||||
format = VIR_STORAGE_FILE_RAW; /* Stops further recursion */
|
||||
|
||||
/* Allow probing for image formats that are safe */
|
||||
if (format == VIR_STORAGE_FILE_AUTO_SAFE)
|
||||
format = VIR_STORAGE_FILE_AUTO;
|
||||
} while (nextpath);
|
||||
|
||||
ret = 0;
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
VIR_ENUM_IMPL(virStorageFileFormat,
|
||||
VIR_STORAGE_FILE_LAST,
|
||||
"raw", "dir", "bochs",
|
||||
"raw", "probe", "dir", "bochs",
|
||||
"cloop", "cow", "dmg", "iso",
|
||||
"qcow", "qcow2", "qed", "vmdk", "vpc")
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
enum virStorageFileFormat {
|
||||
VIR_STORAGE_FILE_AUTO = -1,
|
||||
VIR_STORAGE_FILE_RAW = 0,
|
||||
VIR_STORAGE_FILE_AUTO_SAFE,
|
||||
VIR_STORAGE_FILE_DIR,
|
||||
VIR_STORAGE_FILE_BOCHS,
|
||||
VIR_STORAGE_FILE_CLOOP,
|
||||
|
Loading…
x
Reference in New Issue
Block a user