partsep = virXMLPropString(nodeset[i], "part_separator");
if (partsep) {
- dev.part_separator = virTristateBoolTypeFromString(partsep);
- if (dev.part_separator <= 0) {
+ int value = virTristateBoolTypeFromString(partsep);
+ if (value <= 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid part_separator setting '%s'"),
partsep);
virStoragePoolSourceDeviceClear(&dev);
goto cleanup;
}
+ dev.part_separator = value;
}
if (VIR_APPEND_ELEMENT(source->devices, source->ndevice, dev) < 0) {
virBufferEscapeString(buf, "<device path='%s'",
src->devices[i].path);
if (src->devices[i].part_separator !=
- VIR_TRISTATE_SWITCH_ABSENT) {
+ VIR_TRISTATE_BOOL_ABSENT) {
virBufferAsprintf(buf, " part_separator='%s'",
virTristateBoolTypeToString(src->devices[i].part_separator));
}
virStoragePoolSourceDeviceExtent *freeExtents;
char *path;
int format; /* Pool specific source format */
- int part_separator; /* enum virTristateSwitch */
+ virTristateBool part_separator;
/* When the source device is a physical disk,
* the geometry data is needed