]> git.ipfire.org Git - people/ms/u-boot.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)
commitf941c8d76c665045e5d645112a309d12523e19c7
treec9ed5205c536521ea53c252a303214f52d1f415f
parent6e43d1b19982b1756b7c607569d1778e556d6577
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