return path;
}
-int td_graph_require_source(td_graph* self,
+int td_graph_load_source(td_graph* self,
td_args* args, const char* name, const char* object) {
td_sources* sources = NULL;
td_source* source = NULL;
return r;
}
-int td_graph_require_sources(td_graph* self,
+int td_graph_load_sources(td_graph* self,
td_args* args, const char* name, const char** objects) {
int r;
// Add objects
for (const char** o = objects; *o; o++) {
- r = td_graph_require_source(self, args, name, *o);
+ r = td_graph_load_source(self, args, name, *o);
if (r < 0)
return r;
}
const char* td_graph_get_name(td_graph* self);
char* td_graph_get_bus_path(td_graph* self);
-int td_graph_require_source(td_graph* self,
+int td_graph_load_source(td_graph* self,
td_args* args, const char* name, const char* object);
-int td_graph_require_sources(td_graph* self,
+int td_graph_load_sources(td_graph* self,
td_args* args, const char* name, const char** objects);
int td_graph_render(td_graph* self, const char* object,
int r;
// This requires the conntrack source
- r = td_graph_require_source(graph, args, "conntrack", NULL);
+ r = td_graph_load_source(graph, args, "conntrack", NULL);
if (r < 0)
return r;
int r;
// This requires the contextswitches source
- r = td_graph_require_source(graph, args, "contextswitches", NULL);
+ r = td_graph_load_source(graph, args, "contextswitches", NULL);
if (r < 0)
return r;
return r;
// Require the source
- r = td_graph_require_source(graph, args, "cpufreq", object);
+ r = td_graph_load_source(graph, args, "cpufreq", object);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "disk", object);
+ r = td_graph_load_source(graph, args, "disk", object);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "disk", object);
+ r = td_graph_load_source(graph, args, "disk", object);
if (r < 0)
return r;
int r;
// Require the source
- r = td_graph_require_source(graph, args, "hostapd", object);
+ r = td_graph_load_source(graph, args, "hostapd", object);
if (r < 0)
return r;
int r;
// Require the source
- r = td_graph_require_source(graph, args, "hostapd", object);
+ r = td_graph_load_source(graph, args, "hostapd", object);
if (r < 0)
return r;
int r;
// This require the source
- r = td_graph_require_source(graph, args, "hostapd", object);
+ r = td_graph_load_source(graph, args, "hostapd", object);
if (r < 0)
return r;
int r;
// Require the source
- r = td_graph_require_source(graph, args, "interface", object);
+ r = td_graph_load_source(graph, args, "interface", object);
if (r < 0)
return r;
int r;
// Require the source
- r = td_graph_require_source(graph, args, "interface", object);
+ r = td_graph_load_source(graph, args, "interface", object);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "knot-resolver", NULL);
+ r = td_graph_load_source(graph, args, "knot-resolver", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "legacy-gateway-latency4", NULL);
+ r = td_graph_load_source(graph, args, "legacy-gateway-latency4", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "iptables", "DROP_HOSTILE");
+ r = td_graph_load_source(graph, args, "iptables", "DROP_HOSTILE");
if (r < 0)
return r;
};
// Load all sources
- r = td_graph_require_sources(graph, args, "iptables", sources);
+ r = td_graph_load_sources(graph, args, "iptables", sources);
if (r < 0)
return r;
};
// Load all sources
- r = td_graph_require_sources(graph, args, "iptables", chains);
+ r = td_graph_load_sources(graph, args, "iptables", chains);
if (r < 0)
return r;
int r;
// This requires the loadavg source
- r = td_graph_require_source(graph, args, "loadavg", NULL);
+ r = td_graph_load_source(graph, args, "loadavg", NULL);
if (r < 0)
return r;
int r;
// This requires the loadavg source
- r = td_graph_require_source(graph, args, "memory", NULL);
+ r = td_graph_load_source(graph, args, "memory", NULL);
if (r < 0)
return r;
int r;
// This requires the source
- r = td_graph_require_source(graph, args, source, NULL);
+ r = td_graph_load_source(graph, args, source, NULL);
if (r < 0)
return r;
return 0;
// Add the source
- r = td_graph_require_source(state->graph, state->args, "sensors-power", name);
+ r = td_graph_load_source(state->graph, state->args, "sensors-power", name);
if (r < 0)
return r;
return 0;
// Add the source
- r = td_graph_require_source(state->graph, state->args, "sensors-temp", name);
+ r = td_graph_load_source(state->graph, state->args, "sensors-temp", name);
if (r < 0)
return r;
int r;
// This requires the loadavg source
- r = td_graph_require_source(graph, args, "processor", NULL);
+ r = td_graph_load_source(graph, args, "processor", NULL);
if (r < 0)
return r;
return 0;
// Add the source
- r = td_graph_require_source(state->graph, state->args, "sensors-temp", name);
+ r = td_graph_load_source(state->graph, state->args, "sensors-temp", name);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "unbound", NULL);
+ r = td_graph_load_source(graph, args, "unbound", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "unbound", NULL);
+ r = td_graph_load_source(graph, args, "unbound", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "unbound", NULL);
+ r = td_graph_load_source(graph, args, "unbound", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "unbound", NULL);
+ r = td_graph_load_source(graph, args, "unbound", NULL);
if (r < 0)
return r;
int r;
// Load all sources
- r = td_graph_require_source(graph, args, "unbound", NULL);
+ r = td_graph_load_source(graph, args, "unbound", NULL);
if (r < 0)
return r;
int r;
// This requires the uptime source
- r = td_graph_require_source(graph, args, "uptime", NULL);
+ r = td_graph_load_source(graph, args, "uptime", NULL);
if (r < 0)
return r;