summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-01-21 16:26:56 -0800
committerJeremy Kerr <jk@ozlabs.org>2009-02-01 11:49:29 +1100
commitdae4540e417e2bf72dd83b2713a670bde0056ba9 (patch)
treebf6f168b7f865e3a35eda16879c2d43637056b3f /discover
parent6106bb6672af26232546c07a4b631779f21dbbb0 (diff)
downloadtalos-petitboot-dae4540e417e2bf72dd83b2713a670bde0056ba9.tar.gz
talos-petitboot-dae4540e417e2bf72dd83b2713a670bde0056ba9.zip
Move log to library
Move the log routines to the petitboot library. The log routines are generic enough to be used for both server and client. Does not change the log source. jk: move to lib/log/ instead of lib/ Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r--discover/device-handler.c2
-rw-r--r--discover/discover-server.c2
-rw-r--r--discover/kboot-parser.c2
-rw-r--r--discover/log.c23
-rw-r--r--discover/log.h9
-rw-r--r--discover/parser.c2
-rw-r--r--discover/pb-discover.c2
-rw-r--r--discover/udev.c2
8 files changed, 6 insertions, 38 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 7e5819c..9e40fb1 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -8,13 +8,13 @@
#include <talloc/talloc.h>
#include <list/list.h>
+#include <log/log.h>
#include <pb-protocol/pb-protocol.h>
#include "device-handler.h"
#include "discover-server.h"
#include "parser.h"
#include "udev.h"
-#include "log.h"
#include "paths.h"
#define MOUNT_BIN "/bin/mount"
diff --git a/discover/discover-server.c b/discover/discover-server.c
index 1fab303..56a427b 100644
--- a/discover/discover-server.c
+++ b/discover/discover-server.c
@@ -12,11 +12,11 @@
#include <talloc/talloc.h>
#include <waiter/waiter.h>
+#include <log/log.h>
#include "pb-protocol/pb-protocol.h"
#include "list/list.h"
-#include "log.h"
#include "device-handler.h"
#include "discover-server.h"
diff --git a/discover/kboot-parser.c b/discover/kboot-parser.c
index 7124561..930fbe4 100644
--- a/discover/kboot-parser.c
+++ b/discover/kboot-parser.c
@@ -11,8 +11,8 @@
#include <sys/stat.h>
#include <talloc/talloc.h>
+#include <log/log.h>
-#include "log.h"
#include "pb-protocol/pb-protocol.h"
#include "paths.h"
#include "params.h"
diff --git a/discover/log.c b/discover/log.c
deleted file mode 100644
index e006fd0..0000000
--- a/discover/log.c
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#include <stdarg.h>
-
-#include "log.h"
-
-static FILE *logf;
-
-void pb_log(const char *fmt, ...)
-{
- va_list ap;
- FILE *stream;
-
- stream = logf ? logf : stdout;
-
- va_start(ap, fmt);
- vfprintf(stream, fmt, ap);
- va_end(ap);
-}
-
-void pb_log_set_stream(FILE *stream)
-{
- logf = stream;
-}
diff --git a/discover/log.h b/discover/log.h
deleted file mode 100644
index 3e92555..0000000
--- a/discover/log.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _LOG_H
-#define _LOG_H
-
-#include <stdio.h>
-
-void pb_log(const char *fmt, ...);
-void pb_log_set_stream(FILE *stream);
-
-#endif /* _LOG_H */
diff --git a/discover/parser.c b/discover/parser.c
index 87241a9..2b4ddd2 100644
--- a/discover/parser.c
+++ b/discover/parser.c
@@ -2,9 +2,9 @@
#include <stdlib.h>
#include "pb-protocol/pb-protocol.h"
+#include <log/log.h>
#include "device-handler.h"
-#include "log.h"
#include "parser.h"
#include "parser-utils.h"
diff --git a/discover/pb-discover.c b/discover/pb-discover.c
index d11ab64..d8709b3 100644
--- a/discover/pb-discover.c
+++ b/discover/pb-discover.c
@@ -3,11 +3,11 @@
#include <signal.h>
#include <waiter/waiter.h>
+#include <log/log.h>
#include "udev.h"
#include "discover-server.h"
#include "device-handler.h"
-#include "log.h"
static int running;
diff --git a/discover/udev.c b/discover/udev.c
index 66d9544..9d62840 100644
--- a/discover/udev.c
+++ b/discover/udev.c
@@ -11,9 +11,9 @@
#include <talloc/talloc.h>
#include <waiter/waiter.h>
+#include <log/log.h>
#include "udev.h"
-#include "log.h"
#include "pb-discover.h"
#include "device-handler.h"
OpenPOWER on IntegriCloud