summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-03-25 12:35:48 +0000
committerJeremy Kerr <jk@ozlabs.org>2009-03-30 20:20:00 +1100
commit5d0a6df4644525bf5fbd9d98f3aa4a23a0c03cb4 (patch)
tree8322e8aae6b89cf3b73a9741071210d969923969
parent29fbf1a71d8ac7deace11064fff48e7c2c67c178 (diff)
downloadtalos-petitboot-5d0a6df4644525bf5fbd9d98f3aa4a23a0c03cb4.tar.gz
talos-petitboot-5d0a6df4644525bf5fbd9d98f3aa4a23a0c03cb4.zip
Get log stream
Add a new convenience routine pb_log_get_stream() that returns the current PB_log stream. Used to setup the ps3-utils library to log to the pb_log. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--lib/log/log.c5
-rw-r--r--lib/log/log.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/log/log.c b/lib/log/log.c
index 41b44cc..697af6c 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -27,6 +27,11 @@ void pb_log_set_stream(FILE *stream)
logf = stream;
}
+FILE * pb_log_get_stream(void)
+{
+ return logf;
+}
+
void pb_log_always_flush(int state)
{
always_flush = state;
diff --git a/lib/log/log.h b/lib/log/log.h
index 813a19e..2a5d375 100644
--- a/lib/log/log.h
+++ b/lib/log/log.h
@@ -5,6 +5,7 @@
void pb_log(const char *fmt, ...);
void pb_log_set_stream(FILE *stream);
+FILE * pb_log_get_stream(void);
void pb_log_always_flush(int state);
#endif /* _LOG_H */
OpenPOWER on IntegriCloud