blob: 2c7132693ad852584b87b54afc947ece47257abb [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
Simon Glassed38aef2020-05-10 11:40:03 -060010static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
11 char *const argv[])
Peter Tysereabe6d92009-10-16 17:36:25 -050012{
Peter Tysereabe6d92009-10-16 17:36:25 -050013 if (argc > 1)
Simon Glassff9b9032021-07-24 09:03:30 -060014 return dectoul(argv[1], NULL);
Peter Tysereabe6d92009-10-16 17:36:25 -050015
Marek Vasut83fed4a2021-04-06 14:00:24 +020016 return 0;
Peter Tysereabe6d92009-10-16 17:36:25 -050017}
18
19U_BOOT_CMD(
20 exit, 2, 1, do_exit,
21 "exit script",
22 ""
23);