- 28 10月, 2020 3 次提交
-
-
由 Heinrich Schuchardt 提交于
The log command has led to NULL dereferences if an unknown category name name was used due to missing entries in the list of category names. Add compile time checks for the array sizes of log_cat_name and log_lvl_name to avoid future mishaps. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Heinrich Schuchardt 提交于
Some drivers use macro pr_cont() for continuing a message sent via printk. Hence if we want to convert printk messaging to using the logging system, we must support continuation of log messages too. As pr_cont() does not provide a message level we need a means of remembering the last log level. With the patch a pseudo log level LOGL_CONT as well as a pseudo log category LOGC_CONT are introduced. Using these results in the application of the same log level and category as in the previous log message. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Heinrich Schuchardt 提交于
Replace the static variable processing_msg by a field in the global data. Make the field bool at it can only be true or false. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 22 10月, 2020 1 次提交
-
-
由 Simon Glass 提交于
Add some category names that were missed in recent changes. Update the comment as a reminder. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 11 10月, 2020 3 次提交
-
-
由 Simon Glass 提交于
At present all log devices are enabled by default. Add a function to allow devices to be disabled or enabled at runtime. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file (before log.h inclusion) causes _log() to be executed for every log() call, regardless of the build- or run-time logging level. However there is no guarantee that the log record will actually be displayed. If the current log level is lower than LOGL_DEBUG then it will not be. Add a way to signal that the log record should always be displayed and update log_passes_filters() to handle this. With the new behaviour, log_debug() will always log if LOG_DEBUG is enabled. Move log_test_syslog_nodebug() into its own file since it cannot be made to work where it is, with LOG_DEBUG defined. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 23 9月, 2020 1 次提交
-
-
由 Heinrich Schuchardt 提交于
When a message is written by a log driver (e.g. via the network stack) this may result in the generation of further messages. We cannot allow these additional messages to be emitted as this might result in an infinite recursion. Up to now only the syslog driver was safeguarded. We should safeguard all log drivers instead. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 10 7月, 2020 2 次提交
-
-
由 Heinrich Schuchardt 提交于
The name of the function emitting a log message may be of interest for a developer but is distracting for normal users. See the example below: try_load_entry() Booting: Debian Make the default format for log messages customizable. By default show only the message text. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Heinrich Schuchardt 提交于
If CONFIG_SPL_DM=n and CONFIG_SPL_LOG=y a build error occurs: ld.bfd: common/built-in.o: in function `log_get_cat_name': common/log.c:48: undefined reference to `uclass_get_name' make[1]: *** [scripts/Makefile.spl:422: spl/u-boot-spl] Error 1 Call uclass_get_name() only if DM is enabled. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 27 4月, 2020 1 次提交
-
-
由 Heinrich Schuchardt 提交于
There is no need to cast from (void *) before assigning to a pointer. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 20 2月, 2019 1 次提交
-
-
由 Simon Glass 提交于
At present the default log level is set to LOGL_INFO on start-up. Allow this to be controlled from Kconfig. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 09 10月, 2018 1 次提交
-
-
由 Simon Glass 提交于
It is useful to be able to set the default log level from the command line when running sandbox. Add a new -L command-line flag for this. The log level is set using the enum log_level_t in log.h. At present a number must be specified, e.g. -L7 for debug. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 19 6月, 2018 1 次提交
-
-
由 Simon Glass 提交于
This allows access to an element after the end of the array. Fix it. Reported-by: Coverity (CID: 173279) Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 07 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 10 4月, 2018 1 次提交
-
-
由 Simon Glass 提交于
If there is a problem with the parameters to log_add_filter(), the memory allocated is currently not freed. Fix this. Reported-by: Coverity (CID: 171962) Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 04 2月, 2018 3 次提交
-
-
由 Heinrich Schuchardt 提交于
The EFI implementation does not fit into any of the existing categories. Provide LOGC_EFI so that EFI related message can be filtered. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is useful to be able to control the output format of log records on the console. As a starting point, add definitions for controlling which elements of the log record are displayed. Use function and message as the default, since these are the most useful fields. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Category and level both use an enum for their ID values. Add functions to convert these IDs to strings and vice versa. This will allow the log to output the strings instead of the (inscrutable) values. At the same time, add a new 'driver-model' category, to cover core driver-model functions and fix an incorrect value for LOGL_MAX. Tests will be added with the new 'log' subcommands. Signed-off-by: NSimon Glass <sjg@chromium.org> (Updated to correct clang warnings)
-
- 08 12月, 2017 2 次提交
-
-
由 Simon Glass 提交于
Set up logging both before and after relocation. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Simon Glass 提交于
Add the logging header file and implementation with some configuration options to control it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-