return ret;
}
+
/**
* virXPathInt:
* @xpath: the XPath string to evaluate
return 0;
}
+
/**
* virXPathLong:
* @xpath: the XPath string to evaluate
return virXPathLongBase(xpath, ctxt, 10, value);
}
+
/**
* virXPathLongHex:
* @xpath: the XPath string to evaluate
return virXPathLongBase(xpath, ctxt, 16, value);
}
+
static int
virXPathULongBase(const char *xpath,
xmlXPathContextPtr ctxt,
return ret;
}
+
/**
* virXPathUInt:
* @xpath: the XPath string to evaluate
return 0;
}
+
/**
* virXPathULong:
* @xpath: the XPath string to evaluate
return virXPathULongBase(xpath, ctxt, 10, value);
}
+
/**
* virXPathUHex:
* @xpath: the XPath string to evaluate
return virXPathULongBase(xpath, ctxt, 16, value);
}
+
/**
* virXPathULongLong:
* @xpath: the XPath string to evaluate
return ret;
}
+
/**
* virXPathLongLong:
* @xpath: the XPath string to evaluate
return ret;
}
+
static int
virXMLPropEnumInternal(xmlNodePtr node,
const char *name,
return obj->boolval;
}
+
/**
* virXPathNode:
* @xpath: the XPath string to evaluate
return obj->nodesetval->nodeTab[0];
}
+
/**
* virXPathNodeSet:
* @xpath: the XPath string to evaluate
}
}
+
/**
* virXMLParseHelper:
* @domcode: error domain of the caller, usually VIR_FROM_THIS
return g_steal_pointer(&xml);
}
-const char *virXMLPickShellSafeComment(const char *str1, const char *str2)
+
+const char *
+virXMLPickShellSafeComment(const char *str1,
+ const char *str2)
{
if (str1 && !strpbrk(str1, "\r\t\n !\"#$&'()*;<>?[\\]^`{|}~") &&
!strstr(str1, "--"))
return NULL;
}
-static int virXMLEmitWarning(int fd,
- const char *name,
- const char *cmd)
+
+static int
+virXMLEmitWarning(int fd,
+ const char *name,
+ const char *cmd)
{
size_t len;
const char *prologue =
const char *xml;
};
+
static int
virXMLRewriteFile(int fd,
const char *path,
return 0;
}
+
int
virXMLSaveFile(const char *path,
const char *warnName,
virXMLRewriteFile, &data);
}
+
/**
* virXMLNodeToString: convert an XML node ptr to an XML string
*
}
-static void catchRNGError(void *ctx,
- const char *msg,
- ...)
+static void
+catchRNGError(void *ctx,
+ const char *msg,
+ ...)
{
virBuffer *buf = ctx;
va_list args;
}
-static void ignoreRNGError(void *ctx G_GNUC_UNUSED,
- const char *msg G_GNUC_UNUSED,
- ...)
+static void
+ignoreRNGError(void *ctx G_GNUC_UNUSED,
+ const char *msg G_GNUC_UNUSED,
+ ...)
{}
virBufferFreeAndReset(childBuf);
}
+
/* same as virXMLFormatElement but outputs an empty element if @attrBuf and
* @childBuf are both empty */
void