blob: f40d0686e1e33d6a0ec784d1f9f560ad8011ad86 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Peter Tysereabe6d92009-10-16 17:36:25 -05002/*
3 * Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Peter Tysereabe6d92009-10-16 17:36:25 -05005 */
6
7#include <common.h>
8#include <command.h>
9
Kim Phillipsdc00a682012-10-29 13:34:31 +000010static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Peter Tysereabe6d92009-10-16 17:36:25 -050011{
12 int r;
13
14 r = 0;
15 if (argc > 1)
16 r = simple_strtoul(argv[1], NULL, 10);
17
18 return -r - 2;
19}
20
21U_BOOT_CMD(
22 exit, 2, 1, do_exit,
23 "exit script",
24 ""
25);