typedef const char *(*virStorageVolFormatToString)(int format);
typedef int (*virStorageVolFormatFromString)(const char *format);
-typedef const char *(*virStorageVolFeatureToString)(int feature);
-typedef int (*virStorageVolFeatureFromString)(const char *feature);
typedef const char *(*virStoragePoolFormatToString)(int format);
typedef int (*virStoragePoolFormatFromString)(const char *format);
int defaultFormat;
virStorageVolFormatToString formatToString;
virStorageVolFormatFromString formatFromString;
- virStorageVolFeatureToString featureToString;
- virStorageVolFeatureFromString featureFromString;
};
/* Flags to indicate mandatory components in the pool source */
.defaultFormat = VIR_STORAGE_FILE_RAW,
.formatFromString = virStorageVolumeFormatFromString,
.formatToString = virStorageFileFormatTypeToString,
- .featureFromString = virStorageFileFeatureTypeFromString,
- .featureToString = virStorageFileFeatureTypeToString,
},
},
{.poolType = VIR_STORAGE_POOL_FS,
.defaultFormat = VIR_STORAGE_FILE_RAW,
.formatFromString = virStorageVolumeFormatFromString,
.formatToString = virStorageFileFormatTypeToString,
- .featureFromString = virStorageFileFeatureTypeFromString,
- .featureToString = virStorageFileFeatureTypeToString,
},
},
{.poolType = VIR_STORAGE_POOL_NETFS,
.defaultFormat = VIR_STORAGE_FILE_RAW,
.formatFromString = virStorageVolumeFormatFromString,
.formatToString = virStorageFileFormatTypeToString,
- .featureFromString = virStorageFileFeatureTypeFromString,
- .featureToString = virStorageFileFeatureTypeToString,
},
},
{.poolType = VIR_STORAGE_POOL_ISCSI,
.defaultFormat = VIR_STORAGE_FILE_RAW,
.formatToString = virStorageFileFormatTypeToString,
.formatFromString = virStorageVolumeFormatFromString,
- .featureFromString = virStorageFileFeatureTypeFromString,
- .featureToString = virStorageFileFeatureTypeToString,
}
},
{.poolType = VIR_STORAGE_POOL_MPATH,
if (virXPathNode("./target/nocow", ctxt))
ret->target.nocow = true;
- if (options->featureFromString && virXPathNode("./target/features", ctxt)) {
+ if (virXPathNode("./target/features", ctxt)) {
if ((n = virXPathNodeSet("./target/features/*", ctxt, &nodes)) < 0)
goto error;
goto error;
for (i = 0; i < n; i++) {
- int f = options->featureFromString((const char*)nodes[i]->name);
+ int f = virStorageFileFeatureTypeFromString((const char*)nodes[i]->name);
if (f < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported feature %s"),
virBufferEscapeString(buf, "<compat>%s</compat>\n", def->compat);
- if (options->featureToString && def->features) {
+ if (def->features) {
size_t i;
bool empty = virBitmapIsAllClear(def->features);
for (i = 0; i < VIR_STORAGE_FILE_FEATURE_LAST; i++) {
if (virBitmapIsBitSet(def->features, i))
virBufferAsprintf(buf, "<%s/>\n",
- options->featureToString(i));
+ virStorageFileFeatureTypeToString(i));
}
if (!empty) {
virBufferAdjustIndent(buf, -2);