exit.c 376 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2000-2009
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. */
  6. #include <common.h>
  7. #include <command.h>
  8. static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
  9. char *const argv[])
  10. {
  11. if (argc > 1)
  12. return dectoul(argv[1], NULL);
  13. return 0;
  14. }
  15. U_BOOT_CMD(
  16. exit, 2, 1, do_exit,
  17. "exit script",
  18. ""
  19. );