summaryrefslogtreecommitdiffstats
path: root/conf
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 /conf
parent44f26560ec9f108039e6736d6de929f899bf20ea (diff)
downloadbird-c37e78510f2ac4d9bb4c44eddf33352eda72fd0f.tar
bird-c37e78510f2ac4d9bb4c44eddf33352eda72fd0f.zip
Makes date/time formats configurable.
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.c2
-rw-r--r--conf/conf.h5
-rw-r--r--conf/confbase.Y1
3 files changed, 8 insertions, 0 deletions
diff --git a/conf/conf.c b/conf/conf.c
index 7ffe8d1..bc0715a 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -80,6 +80,8 @@ config_alloc(byte *name)
cfg_mem = c->mem = l;
c->file_name = cfg_strdup(name);
c->load_time = now;
+ c->tf_base.fmt1 = c->tf_log.fmt1 = "%d-%m-%Y %T";
+
if (!boot_time)
boot_time = now;
return c;
diff --git a/conf/conf.h b/conf/conf.h
index f8ab713..5823cdb 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -29,6 +29,11 @@ struct config {
u32 listen_bgp_flags; /* Listening BGP socket should use these flags */
unsigned proto_default_debug; /* Default protocol debug mask */
unsigned proto_default_mrtdump; /* Default protocol mrtdump mask */
+ struct timeformat tf_route; /* Time format for 'show route' */
+ struct timeformat tf_proto; /* Time format for 'show protocol' */
+ struct timeformat tf_log; /* Time format for the logfile */
+ struct timeformat tf_base; /* Time format for other purposes */
+
int cli_debug; /* Tracing of CLI connections and commands */
char *err_msg; /* Parser error message */
int err_lino; /* Line containing error */
diff --git a/conf/confbase.Y b/conf/confbase.Y
index 91bfb1d..b65d608 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -42,6 +42,7 @@ CF_DECLS
void *g;
bird_clock_t time;
struct prefix px;
+ struct timeformat *tf;
}
%token END CLI_MARKER INVALID_TOKEN