mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
virDomainChrSourceDefParseLog: Use virXMLProp*
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
fcc563a29b
commit
97cdb5be1e
@ -11730,20 +11730,11 @@ static int
|
||||
virDomainChrSourceDefParseLog(virDomainChrSourceDef *def,
|
||||
xmlNodePtr log)
|
||||
{
|
||||
g_autofree char *append = NULL;
|
||||
|
||||
def->logfile = virXMLPropString(log, "file");
|
||||
|
||||
if ((append = virXMLPropString(log, "append"))) {
|
||||
int value;
|
||||
if ((value = virTristateSwitchTypeFromString(append)) <= 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid append attribute value '%s'"),
|
||||
append);
|
||||
if (virXMLPropTristateSwitch(log, "append", VIR_XML_PROP_NONE,
|
||||
&def->logappend) < 0)
|
||||
return -1;
|
||||
}
|
||||
def->logappend = value;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user