}
-static int
-dnsmasqCapsSetFromFile(dnsmasqCaps *caps, const char *path)
-{
- int ret = -1;
- g_autofree char *buf = NULL;
-
- if (virFileReadAll(path, 1024 * 1024, &buf) < 0)
- goto cleanup;
-
- ret = dnsmasqCapsSetFromBuffer(caps, buf);
-
- cleanup:
- return ret;
-}
-
static int
dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force)
{
return caps;
}
-dnsmasqCaps *
-dnsmasqCapsNewFromFile(const char *dataPath, const char *binaryPath)
-{
- dnsmasqCaps *caps = dnsmasqCapsNewEmpty(binaryPath);
-
- if (!caps)
- return NULL;
-
- if (dnsmasqCapsSetFromFile(caps, dataPath) < 0) {
- virObjectUnref(caps);
- return NULL;
- }
- return caps;
-}
-
dnsmasqCaps *
dnsmasqCapsNewFromBinary(const char *binaryPath)
{
dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf,
const char *binaryPath);
-dnsmasqCaps *dnsmasqCapsNewFromFile(const char *dataPath,
- const char *binaryPath);
dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath);
int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath);
bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag);