bloblist.c 840 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #include <common.h>
  9. #include <bloblist.h>
  10. #include <command.h>
  11. DECLARE_GLOBAL_DATA_PTR;
  12. static int do_bloblist_info(struct cmd_tbl *cmdtp, int flag, int argc,
  13. char *const argv[])
  14. {
  15. bloblist_show_stats();
  16. return 0;
  17. }
  18. static int do_bloblist_list(struct cmd_tbl *cmdtp, int flag, int argc,
  19. char *const argv[])
  20. {
  21. bloblist_show_list();
  22. return 0;
  23. }
  24. static char bloblist_help_text[] =
  25. "info - show information about the bloblist\n"
  26. "bloblist list - list blobs in the bloblist";
  27. U_BOOT_CMD_WITH_SUBCMDS(bloblist, "Bloblists", bloblist_help_text,
  28. U_BOOT_SUBCMD_MKENT(info, 1, 1, do_bloblist_info),
  29. U_BOOT_SUBCMD_MKENT(list, 1, 1, do_bloblist_list));