diff options
| author | David Lamparter <equinox@diac24.net> | 2021-02-14 15:35:07 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2021-02-14 15:36:51 +0100 |
| commit | 1d5453d6070f5266f0bdf709690282a0dc5dc83d (patch) | |
| tree | 7eb4346adce641e92cc79a0be696908e924466e1 /lib | |
| parent | 44b0793e88503b4b70a569c0579f7a79b587f627 (diff) | |
*: remove tabs & newlines from log messages
Neither tabs nor newlines are acceptable in syslog messages. They also
break line-based parsing of file logs.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/command_parse.y | 2 | ||||
| -rw-r--r-- | lib/link_state.c | 10 | ||||
| -rw-r--r-- | lib/stream.c | 4 | ||||
| -rw-r--r-- | lib/thread.c | 2 | ||||
| -rw-r--r-- | lib/vrf.c | 4 | ||||
| -rw-r--r-- | lib/zclient.c | 14 |
6 files changed, 18 insertions, 18 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y index ba5225b702..8135d02b4b 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -496,7 +496,7 @@ terminate_graph (CMD_YYLTYPE *locp, struct parser_ctx *ctx, zlog_err ("----------"); while (ctx->docstr && ctx->docstr[1] != '\0') zlog_err ("%s", strsep(&ctx->docstr, "\n")); - zlog_err ("----------\n"); + zlog_err ("----------"); } graph_add_edge (finalnode, end_token_node); diff --git a/lib/link_state.c b/lib/link_state.c index 8dc5ab8eee..6bd7ef703c 100644 --- a/lib/link_state.c +++ b/lib/link_state.c @@ -1234,7 +1234,7 @@ void ls_dump_ted(struct ls_ted *ted) /* Loop TED, start printing Node, then Attributes and finally Prefix */ frr_each(vertices, &ted->vertices, vertex) { ls_vertex2msg(&msg, vertex); - zlog_debug("\tTed node (%s %pI4 %s)", + zlog_debug(" Ted node (%s %pI4 %s)", vertex->node->name[0] ? vertex->node->name : "no name node", &vertex->node->router_id, @@ -1246,7 +1246,7 @@ void ls_dump_ted(struct ls_ted *ted) for (ALL_LIST_ELEMENTS_RO(vertex->incoming_edges, lst_node, vertex_edge)) { zlog_debug( - "\t\tinc edge key:%lldn attr key:%pI4 loc:(%pI4) rmt:(%pI4)", + " inc edge key:%lldn attr key:%pI4 loc:(%pI4) rmt:(%pI4)", vertex_edge->key, &vertex_edge->attributes->adv.id.ip.addr, &vertex_edge->attributes->standard.local, @@ -1255,7 +1255,7 @@ void ls_dump_ted(struct ls_ted *ted) for (ALL_LIST_ELEMENTS_RO(vertex->outgoing_edges, lst_node, vertex_edge)) { zlog_debug( - "\t\tout edge key:%lld attr key:%pI4 loc:(%pI4) rmt:(%pI4)", + " out edge key:%lld attr key:%pI4 loc:(%pI4) rmt:(%pI4)", vertex_edge->key, &vertex_edge->attributes->adv.id.ip.addr, &vertex_edge->attributes->standard.local, @@ -1264,7 +1264,7 @@ void ls_dump_ted(struct ls_ted *ted) } frr_each(edges, &ted->edges, edge) { ls_edge2msg(&msg, edge); - zlog_debug("\tTed edge key:%lld src:%s dst:%s", edge->key, + zlog_debug(" Ted edge key:%lld src:%s dst:%s", edge->key, edge->source ? edge->source->node->name : "no_source", edge->destination ? edge->destination->node->name @@ -1273,7 +1273,7 @@ void ls_dump_ted(struct ls_ted *ted) frr_each(subnets, &ted->subnets, subnet) { ls_subnet2msg(&msg, subnet); zlog_debug( - "\tTed subnet key:%pFX vertex:%pI4 pfx:%pFX", + " Ted subnet key:%pFX vertex:%pI4 pfx:%pFX", &subnet->key, &subnet->vertex->node->adv.id.ip.addr, &subnet->ls_pref->pref); diff --git a/lib/stream.c b/lib/stream.c index e4e37b7315..ef73c2fdc9 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -57,7 +57,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO") #define STREAM_WARN_OFFSETS(S) \ do { \ flog_warn(EC_LIB_STREAM, \ - "&(struct stream): %p, size: %lu, getp: %lu, endp: %lu\n", \ + "&(struct stream): %p, size: %lu, getp: %lu, endp: %lu", \ (void *)(S), (unsigned long)(S)->size, \ (unsigned long)(S)->getp, (unsigned long)(S)->endp); \ zlog_backtrace(LOG_WARNING); \ @@ -93,7 +93,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO") if (((S)->endp + (Z)) > (S)->size) { \ flog_warn( \ EC_LIB_STREAM, \ - "CHECK_SIZE: truncating requested size %lu\n", \ + "CHECK_SIZE: truncating requested size %lu", \ (unsigned long)(Z)); \ STREAM_WARN_OFFSETS(S); \ (Z) = (S)->size - (S)->endp; \ diff --git a/lib/thread.c b/lib/thread.c index c140c7600c..e0d734a951 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1365,7 +1365,7 @@ static int thread_process_io_helper(struct thread_master *m, if (!thread) { if ((actual_state & (POLLHUP|POLLIN)) != POLLHUP) flog_err(EC_LIB_NO_THREAD, - "Attempting to process an I/O event but for fd: %d(%d) no thread to handle this!\n", + "Attempting to process an I/O event but for fd: %d(%d) no thread to handle this!", m->handler.pfds[pos].fd, actual_state); return 0; } @@ -675,12 +675,12 @@ int vrf_handler_create(struct vty *vty, const char *vrfname, if (strlen(vrfname) > VRF_NAMSIZ) { if (vty) vty_out(vty, - "%% VRF name %s invalid: length exceeds %d bytes\n", + "%% VRF name %s invalid: length exceeds %d bytes", vrfname, VRF_NAMSIZ); else flog_warn( EC_LIB_VRF_LENGTH, - "%% VRF name %s invalid: length exceeds %d bytes\n", + "%% VRF name %s invalid: length exceeds %d bytes", vrfname, VRF_NAMSIZ); return CMD_WARNING_CONFIG_FAILED; } diff --git a/lib/zclient.c b/lib/zclient.c index bfdf4971bb..20c285cf7f 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1002,7 +1002,7 @@ static int zapi_nhg_encode(struct stream *s, int cmd, struct zapi_nhg *api_nhg) if (cmd != ZEBRA_NHG_DEL && cmd != ZEBRA_NHG_ADD) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Specified zapi NHG command (%d) doesn't exist\n", + "%s: Specified zapi NHG command (%d) doesn't exist", __func__, cmd); return -1; } @@ -1010,7 +1010,7 @@ static int zapi_nhg_encode(struct stream *s, int cmd, struct zapi_nhg *api_nhg) if (api_nhg->nexthop_num >= MULTIPATH_NUM || api_nhg->backup_nexthop_num >= MULTIPATH_NUM) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: zapi NHG encode with invalid input\n", __func__); + "%s: zapi NHG encode with invalid input", __func__); return -1; } @@ -1065,7 +1065,7 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api) if (api->type >= ZEBRA_ROUTE_MAX) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Specified route type (%u) is not a legal value\n", + "%s: Specified route type (%u) is not a legal value", __func__, api->type); return -1; } @@ -1077,7 +1077,7 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api) if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Specified route SAFI (%u) is not a legal value\n", + "%s: Specified route SAFI (%u) is not a legal value", __func__, api->safi); return -1; } @@ -1292,7 +1292,7 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api) STREAM_GETC(s, api->type); if (api->type >= ZEBRA_ROUTE_MAX) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Specified route type: %d is not a legal value\n", + "%s: Specified route type: %d is not a legal value", __func__, api->type); return -1; } @@ -1303,7 +1303,7 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api) STREAM_GETC(s, api->safi); if (api->safi < SAFI_UNICAST || api->safi >= SAFI_MAX) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Specified route SAFI (%u) is not a legal value\n", + "%s: Specified route SAFI (%u) is not a legal value", __func__, api->safi); return -1; } @@ -3304,7 +3304,7 @@ static void zclient_capability_decode(ZAPI_CALLBACK_ARGS) if (vrf_backend < 0 || vrf_configure_backend(vrf_backend)) { flog_err(EC_LIB_ZAPI_ENCODE, - "%s: Garbage VRF backend type: %d\n", __func__, + "%s: Garbage VRF backend type: %d", __func__, vrf_backend); goto stream_failure; } |
