summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-02-03 00:19:24 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-02-03 00:19:24 +0100
commitc37e78510f2ac4d9bb4c44eddf33352eda72fd0f (patch)
tree82153f7a851aeeaf6999ee59b3bd18ebbc761254 /nest
parent44f26560ec9f108039e6736d6de929f899bf20ea (diff)
downloadbird-c37e78510f2ac4d9bb4c44eddf33352eda72fd0f.tar
bird-c37e78510f2ac4d9bb4c44eddf33352eda72fd0f.zip
Makes date/time formats configurable.
Diffstat (limited to 'nest')
-rw-r--r--nest/cmds.c6
-rw-r--r--nest/proto.c10
-rw-r--r--nest/rt-table.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/nest/cmds.c b/nest/cmds.c
index faed870..16fbba6 100644
--- a/nest/cmds.c
+++ b/nest/cmds.c
@@ -18,12 +18,12 @@ cmd_show_status(void)
byte tim[TM_DATETIME_BUFFER_SIZE];
cli_msg(-1000, "BIRD " BIRD_VERSION);
- tm_format_datetime(tim, now);
+ tm_format_datetime(tim, &config->tf_base, now);
cli_msg(-1011, "Router ID is %R", config->router_id);
cli_msg(-1011, "Current server time is %s", tim);
- tm_format_datetime(tim, boot_time);
+ tm_format_datetime(tim, &config->tf_base, boot_time);
cli_msg(-1011, "Last reboot on %s", tim);
- tm_format_datetime(tim, config->load_time);
+ tm_format_datetime(tim, &config->tf_base, config->load_time);
cli_msg(-1011, "Last reconfiguration on %s", tim);
if (shutting_down)
cli_msg(13, "Shutdown in progress");
diff --git a/nest/proto.c b/nest/proto.c
index 9f0311f..297c05e 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -730,18 +730,18 @@ proto_state_name(struct proto *p)
static void
proto_do_show(struct proto *p, int verbose)
{
- byte buf[256], reltime[TM_RELTIME_BUFFER_SIZE];
+ byte buf[256], tbuf[TM_DATETIME_BUFFER_SIZE];
buf[0] = 0;
if (p->proto->get_status)
p->proto->get_status(p, buf);
- tm_format_reltime(reltime, p->last_state_change);
- cli_msg(-1002, "%-8s %-8s %-8s %-5s %-5s %s",
+ tm_format_datetime(tbuf, &config->tf_proto, p->last_state_change);
+ cli_msg(-1002, "%-8s %-8s %-8s %-5s %-10s %s",
p->name,
p->proto->name,
p->table->name,
proto_state_name(p),
- reltime,
+ tbuf,
buf);
if (verbose)
{
@@ -782,7 +782,7 @@ proto_show(struct symbol *s, int verbose)
cli_msg(9002, "%s is not a protocol", s->name);
return;
}
- cli_msg(-2002, "name proto table state since info");
+ cli_msg(-2002, "name proto table state since info");
if (s)
proto_do_show(((struct proto_config *)s->def)->proto, verbose);
else
diff --git a/nest/rt-table.c b/nest/rt-table.c
index df2834a..ed7ecd5 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1114,11 +1114,11 @@ static void
rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, ea_list *tmpa)
{
byte via[STD_ADDRESS_P_LENGTH+32], from[STD_ADDRESS_P_LENGTH+6];
- byte tm[TM_RELTIME_BUFFER_SIZE], info[256];
+ byte tm[TM_DATETIME_BUFFER_SIZE], info[256];
rta *a = e->attrs;
rt_format_via(e, via);
- tm_format_reltime(tm, e->lastmod);
+ tm_format_datetime(tm, &config->tf_route, e->lastmod);
if (ipa_nonzero(a->from) && !ipa_equal(a->from, a->gw))
bsprintf(from, " from %I", a->from);
else