bloblist.c 869 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. static char bloblist_help_text[] =
  26. "info - show information about the bloblist\n"
  27. "bloblist list - list blobs in the bloblist";
  28. U_BOOT_CMD_WITH_SUBCMDS(bloblist, "Bloblists", bloblist_help_text,
  29. U_BOOT_SUBCMD_MKENT(info, 1, 1, do_bloblist_info),
  30. U_BOOT_SUBCMD_MKENT(list, 1, 1, do_bloblist_list));