"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote: ... > diff -r 4c283aac5fd6 src/storage_backend_disk.c > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/src/storage_backend_disk.c Thu Feb 07 16:51:32 2008 -0500 ... > +static int virStorageBackendDiskVolFormatFromString(virConnectPtr conn, > + const char *format) { > + if (format == NULL) > + return VIR_STORAGE_VOL_DISK_NONE; > + > + if (STREQ(format, "none")) > + return VIR_STORAGE_VOL_DISK_NONE; > + if (STREQ(format, "linux")) > + return VIR_STORAGE_VOL_DISK_LINUX; > + if (STREQ(format, "fat16")) > + return VIR_STORAGE_VOL_DISK_FAT16; > + if (STREQ(format, "fat32")) > + return VIR_STORAGE_VOL_DISK_FAT32; > + if (STREQ(format, "linux-swap")) > + return VIR_STORAGE_VOL_DISK_LINUX_SWAP; > + if (STREQ(format, "linux-lvm")) > + return VIR_STORAGE_VOL_DISK_LINUX_LVM; > + if (STREQ(format, "linux-raid")) > + return VIR_STORAGE_VOL_DISK_LINUX_RAID; > + if (STREQ(format, "extended")) > + return VIR_STORAGE_VOL_DISK_EXTENDED; > + > + virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, "unsupported volume format %s", format); > + return -1; > +} > + > +static const char *virStorageBackendDiskVolFormatToString(virConnectPtr conn, > + int format) { > + switch (format) { > + case VIR_STORAGE_VOL_DISK_NONE: > + return "none"; > + case VIR_STORAGE_VOL_DISK_LINUX: > + return "linux"; > + case VIR_STORAGE_VOL_DISK_FAT16: > + return "fat16"; > + case VIR_STORAGE_VOL_DISK_FAT32: > + return "fat32"; > + case VIR_STORAGE_VOL_DISK_LINUX_SWAP: > + return "swap"; > + case VIR_STORAGE_VOL_DISK_LINUX_LVM: > + return "lvm"; > + case VIR_STORAGE_VOL_DISK_LINUX_RAID: > + return "raid"; > + case VIR_STORAGE_VOL_DISK_EXTENDED: > + return "extended"; > + } Hi Dan, I suppose the above functions should have the same strings and enum values? If so, the strings for the three VIR_STORAGE_VOL_DISK_LINUX_* enums in the latter need to match the "linux-..." prefixed ones above. -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list