From 5d0a6df4644525bf5fbd9d98f3aa4a23a0c03cb4 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 25 Mar 2009 12:35:48 +0000 Subject: 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 Signed-off-by: Jeremy Kerr --- lib/log/log.c | 5 +++++ lib/log/log.h | 1 + 2 files changed, 6 insertions(+) (limited to 'lib/log') 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 */ -- cgit v1.2.1