From e36f61b507746afff375759b1e496af529b98b26 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 11 Nov 2021 14:33:41 -0500 Subject: [PATCH] *: Rename quagga_timestamp with frr_timestamp Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 12 ++++++------ bgpd/bgp_route.c | 4 ++-- lib/log.c | 2 +- lib/log.h | 10 +++++----- lib/vty.c | 6 +++--- vtysh/vtysh.c | 2 +- zebra/interface.c | 4 ++-- zebra/interface.h | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 5b997867e0..91265ed358 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -756,8 +756,8 @@ void bgp_update_delay_end(struct bgp *bgp) bgp->implicit_eors = 0; bgp->explicit_eors = 0; - quagga_timestamp(3, bgp->update_delay_end_time, - sizeof(bgp->update_delay_end_time)); + frr_timestamp(3, bgp->update_delay_end_time, + sizeof(bgp->update_delay_end_time)); /* * Add an end-of-initial-update marker to the main process queues so @@ -804,8 +804,8 @@ void bgp_start_routeadv(struct bgp *bgp) if (bgp->main_peers_update_hold) return; - quagga_timestamp(3, bgp->update_delay_peers_resume_time, - sizeof(bgp->update_delay_peers_resume_time)); + frr_timestamp(3, bgp->update_delay_peers_resume_time, + sizeof(bgp->update_delay_peers_resume_time)); for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { if (!peer_established(peer)) @@ -1057,8 +1057,8 @@ static void bgp_update_delay_begin(struct bgp *bgp) thread_add_timer(bm->master, bgp_establish_wait_timer, bgp, bgp->v_establish_wait, &bgp->t_establish_wait); - quagga_timestamp(3, bgp->update_delay_begin_time, - sizeof(bgp->update_delay_begin_time)); + frr_timestamp(3, bgp->update_delay_begin_time, + sizeof(bgp->update_delay_begin_time)); } static void bgp_update_delay_process_status_change(struct peer *peer) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index fdaee9b600..962a35a4ad 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2775,8 +2775,8 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest, } /* Is it end of initial update? (after startup) */ if (!dest) { - quagga_timestamp(3, bgp->update_delay_zebra_resume_time, - sizeof(bgp->update_delay_zebra_resume_time)); + frr_timestamp(3, bgp->update_delay_zebra_resume_time, + sizeof(bgp->update_delay_zebra_resume_time)); bgp->main_zebra_update_hold = 0; FOREACH_AFI_SAFI (afi, safi) { diff --git a/lib/log.c b/lib/log.c index 8be171613e..fb12c08aae 100644 --- a/lib/log.c +++ b/lib/log.c @@ -64,7 +64,7 @@ const char *lookup_msg(const struct message *mz, int kz, const char *nf) } /* For time string format. */ -size_t quagga_timestamp(int timestamp_precision, char *buf, size_t buflen) +size_t frr_timestamp(int timestamp_precision, char *buf, size_t buflen) { static struct { time_t last; diff --git a/lib/log.h b/lib/log.h index 59f1742d01..3011fa9a99 100644 --- a/lib/log.h +++ b/lib/log.h @@ -102,9 +102,9 @@ extern void zlog_backtrace_sigsafe(int priority, void *program_counter); It caches the most recent localtime result and can therefore avoid multiple calls within the same second. If buflen is too small, *buf will be set to '\0', and 0 will be returned. */ -#define QUAGGA_TIMESTAMP_LEN 40 -extern size_t quagga_timestamp(int timestamp_precision /* # subsecond digits */, - char *buf, size_t buflen); +#define FRR_TIMESTAMP_LEN 40 +extern size_t frr_timestamp(int timestamp_precision /* # subsecond digits */, + char *buf, size_t buflen); extern void zlog_hexdump(const void *mem, size_t len); extern const char *zlog_sanitize(char *buf, size_t bufsz, const void *in, @@ -135,8 +135,8 @@ struct timestamp_control { size_t len; /* length of rendered timestamp */ int precision; /* configuration parameter */ int already_rendered; /* should be initialized to 0 */ - char buf[QUAGGA_TIMESTAMP_LEN]; /* will contain the rendered timestamp - */ + char buf[FRR_TIMESTAMP_LEN]; /* will contain the rendered timestamp + */ }; /* Defines for use in command construction: */ diff --git a/lib/vty.c b/lib/vty.c index 388af8ebaf..b702fa7850 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -283,10 +283,10 @@ done: /* Output current time to the vty. */ void vty_time_print(struct vty *vty, int cr) { - char buf[QUAGGA_TIMESTAMP_LEN]; + char buf[FRR_TIMESTAMP_LEN]; - if (quagga_timestamp(0, buf, sizeof(buf)) == 0) { - zlog_info("quagga_timestamp error"); + if (frr_timestamp(0, buf, sizeof(buf)) == 0) { + zlog_info("frr_timestamp error"); return; } if (cr) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 53349452e6..2537ff4571 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -484,7 +484,7 @@ static int vtysh_execute_func(const char *line, int pager) if (vtysh_add_timestamp && strncmp(line, "exit", 4)) { char ts[48]; - (void)quagga_timestamp(3, ts, sizeof(ts)); + (void)frr_timestamp(3, ts, sizeof(ts)); vty_out(vty, "%% %s\n\n", ts); } diff --git a/zebra/interface.c b/zebra/interface.c index 6479dbb58a..49a1e49175 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1026,7 +1026,7 @@ void if_up(struct interface *ifp) zif = ifp->info; zif->up_count++; - quagga_timestamp(2, zif->up_last, sizeof(zif->up_last)); + frr_timestamp(2, zif->up_last, sizeof(zif->up_last)); /* Notify the protocol daemons. */ if (ifp->ptm_enable && (ifp->ptm_status == ZEBRA_PTM_STATUS_DOWN)) { @@ -1090,7 +1090,7 @@ void if_down(struct interface *ifp) zif = ifp->info; zif->down_count++; - quagga_timestamp(2, zif->down_last, sizeof(zif->down_last)); + frr_timestamp(2, zif->down_last, sizeof(zif->down_last)); if_down_nhg_dependents(ifp); diff --git a/zebra/interface.h b/zebra/interface.h index 23e22bdda8..771398b547 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -340,9 +340,9 @@ struct zebra_if { /* Information about up/down changes */ unsigned int up_count; - char up_last[QUAGGA_TIMESTAMP_LEN]; + char up_last[FRR_TIMESTAMP_LEN]; unsigned int down_count; - char down_last[QUAGGA_TIMESTAMP_LEN]; + char down_last[FRR_TIMESTAMP_LEN]; #if defined(HAVE_RTADV) struct rtadvconf rtadv; -- 2.39.5