bloblist.c 903 B

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