diff options
author | Simon Glass <sjg@chromium.org> | 2022-03-04 08:43:06 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-10 08:28:36 -0500 |
commit | c81b460c860a81124af65d78724d34c1a815e3fe (patch) | |
tree | b0f6b8904ed9afd24cd18f94aba63213c021feff /cmd/event.c | |
parent | 7fe32b3442f0d0e77a0768dcc1ee65fb352a080a (diff) |
event: Add a command
Add a command to show the available events.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/event.c')
-rw-r--r-- | cmd/event.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmd/event.c b/cmd/event.c new file mode 100644 index 00000000000..9cac2023530 --- /dev/null +++ b/cmd/event.c @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Command-line access to events + * + * Copyright 2021 Google LLC + * Written by Simon Glass <sjg@chromium.org> + */ + +#include <common.h> +#include <command.h> +#include <event.h> + +static int do_event_list(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + event_show_spy_list(); + + return 0; +} + +#ifdef CONFIG_SYS_LONGHELP +static char event_help_text[] = + "event list - list event spies"; +#endif + +U_BOOT_CMD_WITH_SUBCMDS(event, "Events", event_help_text, + U_BOOT_SUBCMD_MKENT(list, 1, 1, do_event_list)); |