]> git.baikalelectronics.ru Git - uboot.git/commit
log: Add functions to convert IDs to/from names
authorSimon Glass <sjg@chromium.org>
Thu, 28 Dec 2017 20:14:16 +0000 (13:14 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 3 Feb 2018 17:09:13 +0000 (10:09 -0700)
commitba99dfd9e11d32991fb06badacd70b0dd371e4c4
treec9ed5205c536521ea53c252a303214f52d1f415f
parent6fc60c3fb4e42c287d2cd6b5c9fc8f40fab145bf
log: Add functions to convert IDs to/from names

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: Simon Glass <sjg@chromium.org>
(Updated to correct clang warnings)
common/log.c
include/log.h