virDomainChrSourceDefParseFile(virDomainChrSourceDefPtr def,
                               xmlNodePtr source)
{
    g_autofree char *append = NULL;

    def->data.file.path = virXMLPropString(source, "path");

    if ((append = virXMLPropString(source, "append")) &&
        (def->data.file.append = virTristateSwitchTypeFromString(append)) <= 0) {
        virReportError(VIR_ERR_INTERNAL_ERROR,
                       _("Invalid append attribute value '%s'"),
                       append);
        return -1;
    }

    return 0;
}
virDomainChrSourceDefParseFile(virDomainChrSourceDefPtr def,
                               xmlNodePtr source)
{
    g_autofree char *append = NULL;

    def->data.file.path = virXMLPropString(source, "path");

    if ((append = virXMLPropString(source, "append")) &&
        (def->data.file.append = virTristateSwitchTypeFromString(append)) <= 0) {
        virReportError(VIR_ERR_INTERNAL_ERROR,
                       _("Invalid append attribute value '%s'"),
                       append);
        return -1;
    }

    return 0;
}