aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-07-31 14:29:45 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-08 16:07:25 +1000
commite139f2558d34da0ea29f0eaae5843efa0b1aaf5c (patch)
tree2ce1a863fb99e57828efdb2e33d4688f843121b6 /include
parent14296103ae8afb7d38a8b24274f29dd0cc89fb4c (diff)
downloadskiboot-e139f2558d34da0ea29f0eaae5843efa0b1aaf5c.zip
skiboot-e139f2558d34da0ea29f0eaae5843efa0b1aaf5c.tar.gz
skiboot-e139f2558d34da0ea29f0eaae5843efa0b1aaf5c.tar.bz2
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 <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r--include/skiboot.h3
1 files changed, 2 insertions, 1 deletions
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