mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
virDomainDiskDef: Change type of geometry.trans to virDomainDiskGeometryTrans
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
081f22c209
commit
ef18ca1c06
@ -8845,13 +8845,14 @@ virDomainDiskDefGeometryParse(virDomainDiskDef *def,
|
||||
}
|
||||
|
||||
if ((tmp = virXMLPropString(cur, "trans"))) {
|
||||
def->geometry.trans = virDomainDiskGeometryTransTypeFromString(tmp);
|
||||
if (def->geometry.trans <= 0) {
|
||||
int value;
|
||||
if ((value = virDomainDiskGeometryTransTypeFromString(tmp)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("invalid translation value '%s'"),
|
||||
tmp);
|
||||
return -1;
|
||||
}
|
||||
def->geometry.trans = value;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -549,7 +549,7 @@ struct _virDomainDiskDef {
|
||||
unsigned int cylinders;
|
||||
unsigned int heads;
|
||||
unsigned int sectors;
|
||||
int trans; /* enum virDomainDiskGeometryTrans */
|
||||
virDomainDiskGeometryTrans trans;
|
||||
} geometry;
|
||||
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user