summaryrefslogtreecommitdiffstats
path: root/test/log/log_test.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-12 12:28:49 -0600
committerTom Rini <trini@konsulko.com>2020-10-10 16:50:11 -0400
commit3d03ab6361a4a2b60e84da46c547b8ace01a60eb (patch)
treeb7cab1ed0489fd262afc76cf6ec72606c9dc51c5 /test/log/log_test.c
parentbd180db2cc73c7dc00076b0517978a8cdd557519 (diff)
downloadu-boot-3d03ab6361a4a2b60e84da46c547b8ace01a60eb.tar.gz
u-boot-3d03ab6361a4a2b60e84da46c547b8ace01a60eb.tar.xz
u-boot-3d03ab6361a4a2b60e84da46c547b8ace01a60eb.zip
log: Add a way to enable/disable a log device
At present all log devices are enabled by default. Add a function to allow devices to be disabled or enabled at runtime. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/log/log_test.c')
-rw-r--r--test/log/log_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/log/log_test.c b/test/log/log_test.c
index fdee5e6757..6a60ff6be3 100644
--- a/test/log/log_test.c
+++ b/test/log/log_test.c
@@ -196,6 +196,13 @@ static int log_test(int testnum)
log_io("level %d\n", LOGL_DEBUG_IO);
break;
}
+ case 11:
+ log_err("default\n");
+ ret = log_device_set_enable(LOG_GET_DRIVER(console), false);
+ log_err("disabled\n");
+ ret = log_device_set_enable(LOG_GET_DRIVER(console), true);
+ log_err("enabled\n");
+ break;
}
return 0;