提交 31d3af6f 编写于 作者: J John Ferlan

storage: Force setting of disk format type

Commit id '832a9256' adjusted the code to recognize when the default
type of "unknown" was provided as the format type and to use "dos" if
found. Since the pool is built with "dos" and it could cause some
confusion when formatting the XML after building by seeing "unknown"
in the output, let's just adjust the pool's setting to "dos" so that
subsequent formats will see the value.
上级 f1538322
......@@ -472,8 +472,9 @@ virStorageBackendDiskBuildPool(virConnectPtr conn ATTRIBUTE_UNUSED,
/* eg parted /dev/sda mklabel --script msdos */
int format = pool->def->source.format;
const char *fmt;
if (format == VIR_STORAGE_POOL_DISK_UNKNOWN ||
format == VIR_STORAGE_POOL_DISK_DOS)
if (format == VIR_STORAGE_POOL_DISK_UNKNOWN)
format = pool->def->source.format = VIR_STORAGE_POOL_DISK_DOS;
if (format == VIR_STORAGE_POOL_DISK_DOS)
fmt = "msdos";
else
fmt = virStoragePoolFormatDiskTypeToString(format);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册