log: Add a flag to enable log drivers
At present there is no way to disable a log driver. But the syslog driver causes (attempted) network traffic in sandbox every time a log message is printed, which is often. Add a flag to enable a log driver. Adjust struct log_device to use a short for next_filter_num so that no more memory is used for devices. Also fix a missing line in the struct log_driver comment while here. To maintain compatibility, enable it for all drivers for now. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -44,4 +44,5 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)
|
||||
LOG_DRIVER(console) = {
|
||||
.name = "console",
|
||||
.emit = log_console_emit,
|
||||
.flags = LOGDF_ENABLE,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user