blob: bb2e682ff849810b56b204d807d53c88b4fa7c67 [file] [log] [blame]
Simon Glass4aed2272020-09-19 18:49:26 -06001// 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
9#include <common.h>
10#include <bloblist.h>
11#include <command.h>
12
13DECLARE_GLOBAL_DATA_PTR;
14
15static 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
23static 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
31static char bloblist_help_text[] =
32 "info - show information about the bloblist\n"
33 "bloblist list - list blobs in the bloblist";
34
35U_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));