History log of /u-boot/cmd/log.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 3616218b 07-Oct-2023 Tom Rini <trini@konsulko.com>

cmd: Convert existing long help messages to the new macro

- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines
and use U_BOOT_LONGHELP to declare the same variable name as before
- In a few places, either rename the variable to follow convention or
introduce the variable as it was being done inline before.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>

# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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: Tom Rini <trini@konsulko.com>

# 3fd24fa9 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to output a log record

Add a 'log rec' command which allows a log record to be manually output.
This is useful for scripts which want full control over what is logged. It
also permits easy testing of the log system.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad0e5039 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to control the log output format

Add a 'log format' command which can display or change the log output
format. This is useful for changing how much information is displayed. The
ordering of the fields is fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ef11ed82 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a test command

Add a command which exercises the logging system.

Signed-off-by: Simon Glass <sjg@chromium.org>

# d5f61f27 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a 'log level' command

Add a command for adjusting the log level.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

# c5404b64 04-Dec-2017 Simon Glass <sjg@chromium.org>

Drop the log buffer

This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

# 00caae6d 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 2e192b24 17-Jan-2016 Simon Glass <sjg@chromium.org>

Remove the cmd_ prefix from command files

Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>

# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>

# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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: Tom Rini <trini@konsulko.com>

# 3fd24fa9 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to output a log record

Add a 'log rec' command which allows a log record to be manually output.
This is useful for scripts which want full control over what is logged. It
also permits easy testing of the log system.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ad0e5039 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to control the log output format

Add a 'log format' command which can display or change the log output
format. This is useful for changing how much information is displayed. The
ordering of the fields is fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# ef11ed82 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a test command

Add a command which exercises the logging system.

Signed-off-by: Simon Glass <sjg@chromium.org>

# d5f61f27 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a 'log level' command

Add a command for adjusting the log level.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

# c5404b64 04-Dec-2017 Simon Glass <sjg@chromium.org>

Drop the log buffer

This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

# 00caae6d 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 2e192b24 17-Jan-2016 Simon Glass <sjg@chromium.org>

Remove the cmd_ prefix from command files

Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>

# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 401d1c4f 30-Oct-2020 Simon Glass <sjg@chromium.org>

common: Drop asm/global_data.h from common header

Move this out of the common header and include it only where needed. In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly. Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3e40976a 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to manipulate filters

This adds several commands to add, list, and remove log filters. Due to the
complexity of adding a filter, `log filter-list` uses options instead of
positional arguments.

These commands have been added as subcommands to log by using a dash to
join the subcommand and subsubcommand. This is stylistic, and they could be
converted to proper subsubcommands if it is wished.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 018aad87 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Make "log level" print all log levels

This makes the log level command print all valid log levels. The default
log level is annotated. This provides an easy way to see which log levels
are compiled-in.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 1c593a10 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Add commands to list categories and drivers

This allows users to query which categories and drivers are available on
their system. This allows them to construct filter-add commands without
(e.g.) adjusting the log format to show categories and drivers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# fed9c2fb 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Split off log level parsing

Move parsing of log level into its own function so it can be re-used. This
also adds support for using log level names instead of just the integer
equivalent.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# f48b5b56 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

cmd: log: Use sub-commands for log

This reduces duplicate code, and makes adding new sub-commands easier.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 62ef8189 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

test: log: Convert log_test from python to C

When rebasing this series I had to renumber all my log tests because
someone made another log test in the meantime. This involved updaing a
number in several places (C and python), and it wasn't checked by the
compiler. So I though "how hard could it be to just rewrite in C?" And
though it wasn't hard, it *was* tedious. Tests are numbered the same as
before to allow for easier review.

A note that if a test fails, everything after it will probably also fail.
This is because that test won't clean up its filters. There's no easy way
to do the cleanup, except perhaps removing all filters in a wrapper
function.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# c3a54599 27-Oct-2020 Sean Anderson <seanga2@gmail.com>

log: Use CONFIG_IS_ENABLED() for LOG_TEST

Checkpatch complains about using #ifdef for CONFIG variables.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 3c21d773 17-Jun-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: don't show function by default

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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 77007f95 31-May-2020 Heinrich Schuchardt <xypron.glpk@gmx.de>

log: check argument of 'log level' command

Check that the argument provided to the 'log level' command is in the range
between zero and CONFIG_LOG_MAX_LEVEL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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: Tom Rini <trini@konsulko.com>


# 3fd24fa9 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to output a log record

Add a 'log rec' command which allows a log record to be manually output.
This is useful for scripts which want full control over what is logged. It
also permits easy testing of the log system.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ad0e5039 28-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a command to control the log output format

Add a 'log format' command which can display or change the log output
format. This is useful for changing how much information is displayed. The
ordering of the fields is fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# ef11ed82 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a test command

Add a command which exercises the logging system.

Signed-off-by: Simon Glass <sjg@chromium.org>


# d5f61f27 04-Dec-2017 Simon Glass <sjg@chromium.org>

log: Add a 'log level' command

Add a command for adjusting the log level.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# c5404b64 04-Dec-2017 Simon Glass <sjg@chromium.org>

Drop the log buffer

This does not appear to be used by any boards. Before introducing a new
log system, remove this old one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 00caae6d 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>


# 2e192b24 17-Jan-2016 Simon Glass <sjg@chromium.org>

Remove the cmd_ prefix from command files

Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>