Skip to content

Commit

Permalink
kernel: Provide null device as logger target
Browse files Browse the repository at this point in the history
Logger target is the screen by default. Normally this shouldn't
be a problem, because log messages should not occur after GUI
initialization, but in case some spurious message is generated
(e.g. from USB), the GUI screen would be destroyed. This can be
prevented by directing the logger to the new null device. To do
this one has to create a file cmdline.txt on the SD card with this
contents in the first line:

logdev=null
  • Loading branch information
rsta2 committed May 10, 2020
1 parent 88ff182 commit 5455df9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <circle/actled.h>
#include <circle/koptions.h>
#include <circle/devicenameservice.h>
#include <circle/nulldevice.h>
#include <circle/screen.h>
#include <circle/serial.h>
#include <circle/exceptionhandler.h>
Expand Down Expand Up @@ -62,6 +63,7 @@ class CKernel
CActLED m_ActLED;
CKernelOptions m_Options;
CDeviceNameService m_DeviceNameService;
CNullDevice m_NullDevice;
CScreenDevice m_Screen;
//CSerialDevice m_Serial;
CExceptionHandler m_ExceptionHandler;
Expand Down

0 comments on commit 5455df9

Please sign in to comment.