Patchwork [02/18] petitboot: Get log stream

login
register
mail settings
Submitter Geoff Levand
Date March 25, 2009, 10:35 p.m.
Message ID <20090325223547.019404424@am.sony.com>>
Download mbox | patch
Permalink /patch/25107/
State Accepted
Headers show

Comments

Geoff Levand - March 25, 2009, 10:35 p.m.
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>
---
 lib/log/log.c |    5 +++++
 lib/log/log.h |    1 +
 2 files changed, 6 insertions(+)

Patch

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