aboutsummaryrefslogtreecommitdiff
path: root/libflash
diff options
context:
space:
mode:
Diffstat (limited to 'libflash')
-rw-r--r--libflash/libflash.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/libflash/libflash.h b/libflash/libflash.h
index e8d357b..31d3562 100644
--- a/libflash/libflash.h
+++ b/libflash/libflash.h
@@ -19,16 +19,15 @@
#include <stdint.h>
#include <stdbool.h>
-#ifndef FL_INF
+#ifdef __SKIBOOT__
+#include <skiboot.h>
+#define FL_INF(fmt...) do { prlog(PR_INFO, fmt); } while(0)
+#define FL_DBG(fmt...) do { prlog(PR_DEBUG, fmt); } while(0)
+#define FL_ERR(fmt...) do { prlog(PR_ERR, fmt); } while(0)
+#else
+extern bool libflash_debug;
+#define FL_DBG(fmt...) do { if (libflash_debug) printf(fmt); } while(0)
#define FL_INF(fmt...) do { printf(fmt); } while(0)
-#endif
-
-#ifndef FL_DBG
-//#define FL_DBG(fmt...) do { printf(fmt); } while(0)
-#define FL_DBG(fmt...) do { } while(0)
-#endif
-
-#ifndef FL_ERR
#define FL_ERR(fmt...) do { printf(fmt); } while(0)
#endif