Simon Glass | 4aed227 | 2020-09-19 18:49:26 -0600 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Command-line access to bloblist features |
| 4 | * |
| 5 | * Copyright 2020 Google LLC |
| 6 | * Written by Simon Glass <sjg@chromium.org> |
| 7 | */ |
| 8 | |
Simon Glass | 4aed227 | 2020-09-19 18:49:26 -0600 | [diff] [blame] | 9 | #include <bloblist.h> |
| 10 | #include <command.h> |
Simon Glass | 401d1c4 | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 11 | #include <asm/global_data.h> |
Simon Glass | 4aed227 | 2020-09-19 18:49:26 -0600 | [diff] [blame] | 12 | |
| 13 | DECLARE_GLOBAL_DATA_PTR; |
| 14 | |
| 15 | static int do_bloblist_info(struct cmd_tbl *cmdtp, int flag, int argc, |
| 16 | char *const argv[]) |
| 17 | { |
| 18 | bloblist_show_stats(); |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | static int do_bloblist_list(struct cmd_tbl *cmdtp, int flag, int argc, |
| 24 | char *const argv[]) |
| 25 | { |
| 26 | bloblist_show_list(); |
| 27 | |
| 28 | return 0; |
| 29 | } |
| 30 | |
Tom Rini | 3616218 | 2023-10-07 15:13:08 -0400 | [diff] [blame] | 31 | U_BOOT_LONGHELP(bloblist, |
Simon Glass | 4aed227 | 2020-09-19 18:49:26 -0600 | [diff] [blame] | 32 | "info - show information about the bloblist\n" |
Tom Rini | 3616218 | 2023-10-07 15:13:08 -0400 | [diff] [blame] | 33 | "bloblist list - list blobs in the bloblist"); |
Simon Glass | 4aed227 | 2020-09-19 18:49:26 -0600 | [diff] [blame] | 34 | |
| 35 | U_BOOT_CMD_WITH_SUBCMDS(bloblist, "Bloblists", bloblist_help_text, |
| 36 | U_BOOT_SUBCMD_MKENT(info, 1, 1, do_bloblist_info), |
| 37 | U_BOOT_SUBCMD_MKENT(list, 1, 1, do_bloblist_list)); |