1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Makes date/time formats configurable.

This commit is contained in:
Ondrej Zajicek
2010-02-03 00:19:24 +01:00
parent 44f26560ec
commit c37e78510f
11 changed files with 97 additions and 65 deletions

View File

@@ -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;

View File

@@ -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 */

View File

@@ -42,6 +42,7 @@ CF_DECLS
void *g;
bird_clock_t time;
struct prefix px;
struct timeformat *tf;
}
%token END CLI_MARKER INVALID_TOKEN