X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgraph_list.c;h=de80b3b63c2647c534b2ffe92dd0824fc7776ae7;hb=c048f2d5c5dab7e4944ca9a50463fdf4d2748aff;hp=0dc00063f06a9cd01cc41a34a555b824dfca3eb1;hpb=2ab3d5bed954cccd4486ed3c8255f27b0a6ab7eb;p=collection4.git diff --git a/src/graph_list.c b/src/graph_list.c index 0dc0006..de80b3b 100644 --- a/src/graph_list.c +++ b/src/graph_list.c @@ -278,6 +278,30 @@ int gl_search (const char *term, graph_inst_callback_t callback, /* {{{ */ return (0); } /* }}} int gl_search */ +int gl_search_field (graph_ident_field_t field, /* {{{ */ + const char *field_value, + graph_inst_callback_t callback, void *user_data) +{ + size_t i; + + if ((field_value == NULL) || (callback == NULL)) + return (EINVAL); + + for (i = 0; i < gl_active_num; i++) + { + int status; + + status = graph_inst_search_field (gl_active[i], + field, field_value, + /* callback = */ callback, + /* user data = */ user_data); + if (status != 0) + return (status); + } + + return (0); +} /* }}} int gl_search_field */ + int gl_update (void) /* {{{ */ { time_t now;