diff options
author | Geoff Levand <geoff@infradead.org> | 2018-08-02 17:29:34 +0000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-08-07 11:30:36 +1000 |
commit | fb241b16e49ac2bd5bb14db7bc389bd4a0b1df60 (patch) | |
tree | bc161b83c2425b40646507b3d082d917fdb44ff1 /lib | |
parent | c78f9ec47ba92b74698dacdae963dbbefd9b676f (diff) | |
download | talos-petitboot-fb241b16e49ac2bd5bb14db7bc389bd4a0b1df60.tar.gz talos-petitboot-fb241b16e49ac2bd5bb14db7bc389bd4a0b1df60.zip |
discover: Add --debug to kexec
If verbose logging is enabled then add '--debug' to the kexec command line.
Adds a new routine pb_log_get_debug() that can be used to query the log
debug state.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/log/log.c | 5 | ||||
-rw-r--r-- | lib/log/log.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/log/log.c b/lib/log/log.c index 0b145e0..5466d81 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -88,6 +88,11 @@ void pb_log_set_debug(bool _debug) debug = _debug; } +bool pb_log_get_debug(void) +{ + return debug; +} + FILE *pb_log_get_stream(void) { static FILE *null_stream; diff --git a/lib/log/log.h b/lib/log/log.h index 2d4fd91..c2ad58e 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -26,6 +26,7 @@ void __pb_log_init(FILE *stream, bool debug); #endif void pb_log_set_debug(bool debug); +bool pb_log_get_debug(void); FILE *pb_log_get_stream(void); #endif /* _LOG_H */ |