diff options
Diffstat (limited to 'trace-xml.c')
-rw-r--r-- | trace-xml.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/trace-xml.c b/trace-xml.c index 62473fb..bef1f9f 100644 --- a/trace-xml.c +++ b/trace-xml.c | |||
@@ -230,3 +230,19 @@ void tracecmd_xml_free_system(struct tracecmd_xml_system *system) | |||
230 | xmlXPathFreeObject(system->result); | 230 | xmlXPathFreeObject(system->result); |
231 | free(system); | 231 | free(system); |
232 | } | 232 | } |
233 | |||
234 | int tracecmd_xml_system_exists(struct tracecmd_xml_handle *handle, | ||
235 | const char *system) | ||
236 | { | ||
237 | struct tracecmd_xml_system *sys; | ||
238 | int exists = 0; | ||
239 | |||
240 | sys = tracecmd_xml_find_system(handle, system); | ||
241 | if (sys) { | ||
242 | exists = 1; | ||
243 | tracecmd_xml_free_system(sys); | ||
244 | } | ||
245 | |||
246 | return exists; | ||
247 | } | ||
248 | |||