Allow parsing base64 files
Redfish outputs base64 strings. It would be useful if the CLI app could
read those strings in directly.
This commit breaks out a new method "header_valid" to allow tooling to
do an initial reading of a buffer to determine if it appears to be
correct before going further. This allows the CLI app to attempt to
parse as a buffer, if that fails, attempt to parse as base64.
To support as many inputs as possible, this commit makes padding
optional. It also allows a trailing \n as is present in many files.
Change-Id: I4fb759ecefc8ce1c757f1a9e7c4a2b2d220105d0
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/log.c b/log.c
index 2938a60..16f671f 100644
--- a/log.c
+++ b/log.c
@@ -13,7 +13,7 @@
CPER_LOG_NONE,
CPER_LOG_STDIO,
CPER_LOG_CUSTOM,
-} log_type = CPER_LOG_NONE;
+} log_type = CPER_LOG_STDIO;
static void (*log_custom_fn)(const char *, va_list);