From: Florian Forster Date: Wed, 7 Jul 2010 15:24:01 +0000 (+0200) Subject: src/graph_instance.[ch]: Implement "inst_compare". X-Git-Tag: v4.0.0~125 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7173d20ea5c32867ccb6a10f3417a632e41bfe66;p=collection4.git src/graph_instance.[ch]: Implement "inst_compare". --- diff --git a/src/graph_instance.c b/src/graph_instance.c index 0b71e15..93fc3c5 100644 --- a/src/graph_instance.c +++ b/src/graph_instance.c @@ -433,6 +433,12 @@ int inst_get_params (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */ return (0); } /* }}} int inst_get_params */ +int inst_compare (const graph_instance_t *i0, /* {{{ */ + const graph_instance_t *i1) +{ + return (ident_compare (i0->select, i1->select)); +} /* }}} int inst_compare */ + int inst_compare_ident (graph_instance_t *inst, /* {{{ */ const graph_ident_t *ident) { diff --git a/src/graph_instance.h b/src/graph_instance.h index cca55dc..249fe4d 100644 --- a/src/graph_instance.h +++ b/src/graph_instance.h @@ -54,6 +54,8 @@ int inst_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst, graph_ident_t *inst_get_selector (graph_instance_t *inst); +int inst_compare (const graph_instance_t *i0, const graph_instance_t *i1); + int inst_compare_ident (graph_instance_t *inst, const graph_ident_t *ident); /* Returns true if "ident" matches the instance's selector. */