diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-05-08 03:06:07 +0200 |
|---|---|---|
| committer | Quentin Young <qlyoung@users.noreply.github.com> | 2017-05-18 14:07:28 -0400 |
| commit | b85120bcb3af24cc35b97cf1fe0a96e54f3cbb6e (patch) | |
| tree | d2805da49f11ef7e1c38624a0181328353479ad8 /lib/routemap.c | |
| parent | 4d2d73c281b64d7e83a46f7e698a6e8b15f43615 (diff) | |
lib: detangle protocol name/instance from logging
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/routemap.c')
| -rw-r--r-- | lib/routemap.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/routemap.c b/lib/routemap.c index 44b3c2bf9f..ed79beb1e7 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -28,8 +28,8 @@ #include "routemap.h" #include "command.h" #include "log.h" -#include "log_int.h" #include "hash.h" +#include "libfrr.h" DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map") DEFINE_MTYPE( LIB, ROUTE_MAP_NAME, "Route map name") @@ -989,14 +989,7 @@ vty_show_route_map_entry (struct vty *vty, struct route_map *map) struct route_map_index *index; struct route_map_rule *rule; - /* Print the name of the protocol */ - if (zlog_default) - { - vty_out (vty, "%s", zlog_protoname()); - if (zlog_default->instance) - vty_out (vty, " %d", zlog_default->instance); - } - vty_out (vty, ":%s", VTY_NEWLINE); + vty_out (vty, "%s:%s", frr_protonameinst, VTY_NEWLINE); for (index = map->head; index; index = index->next) { @@ -1052,10 +1045,8 @@ vty_show_route_map (struct vty *vty, const char *name) } else { - vty_out (vty, "%s", zlog_protoname()); - if (zlog_default && zlog_default->instance) - vty_out (vty, " %d", zlog_default->instance); - vty_out (vty, ": 'route-map %s' not found%s", name, VTY_NEWLINE); + vty_out (vty, "%s: 'route-map %s' not found%s", frr_protonameinst, + name, VTY_NEWLINE); return CMD_SUCCESS; } } |
