]> git.ipfire.org Git - thirdparty/u-boot.git/blame - cmd/exit.c
Convert CONFIG_MTD_PARTITIONS et al to Kconfig
[thirdparty/u-boot.git] / cmd / exit.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
6b8f5ad1
PT
2/*
3 * Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6b8f5ad1
PT
5 */
6
7#include <common.h>
8#include <command.h>
9
088f1b19 10static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
6b8f5ad1
PT
11{
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);