From e139f2558d34da0ea29f0eaae5843efa0b1aaf5c Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 31 Jul 2014 14:29:45 +1000 Subject: Initial code for timestamps in log This is the initial patch for having timestamps in the log. It currently only wraps prerror to our prlog() function and thus only (very slightly) modifies bootup log. we use the timebase as an indication of the progression of time. It is not perfect, and is indeed reset back to zero during boot, but it should serve adequately for our needs of "approximately this much time elapsed between log entries". Signed-off-by: Stewart Smith Signed-off-by: Benjamin Herrenschmidt --- include/skiboot.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/skiboot.h b/include/skiboot.h index e036475..183590f 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -77,7 +77,8 @@ struct debug_descriptor { extern struct debug_descriptor debug_descriptor; /* General utilities */ -#define prerror(fmt...) do { fprintf(stderr, fmt); } while(0) +void prlog(int log_level, const char* fmt, ...) __attribute__((format (printf, 2, 3))); +#define prerror(fmt...) do { prlog(0, fmt); } while(0) /* Location codes -- at most 80 chars with null termination */ #define LOC_CODE_SIZE 80 -- cgit v1.1