blob: c7892333bb65f7c542df93b59c4c3830aaa48bd7 [file] [log] [blame]
Peter Tyser6b8f5ad2009-10-16 17:36:25 -05001/*
2 * Copyright 2000-2009
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Peter Tyser6b8f5ad2009-10-16 17:36:25 -05006 */
7
8#include <common.h>
9#include <command.h>
10
Kim Phillips088f1b12012-10-29 13:34:31 +000011static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Peter Tyser6b8f5ad2009-10-16 17:36:25 -050012{
13 int r;
14
15 r = 0;
16 if (argc > 1)
17 r = simple_strtoul(argv[1], NULL, 10);
18
19 return -r - 2;
20}
21
22U_BOOT_CMD(
23 exit, 2, 1, do_exit,
24 "exit script",
25 ""
26);