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:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -42,6 +42,7 @@ CF_DECLS
 | 
			
		||||
  void *g;
 | 
			
		||||
  bird_clock_t time;
 | 
			
		||||
  struct prefix px;
 | 
			
		||||
  struct timeformat *tf;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
%token END CLI_MARKER INVALID_TOKEN
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user