X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Froms%2Fu-boot%2Fcommon%2Fcmd_exit.c;fp=qemu%2Froms%2Fu-boot%2Fcommon%2Fcmd_exit.c;h=c7892333bb65f7c542df93b59c4c3830aaa48bd7;hb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;hp=0000000000000000000000000000000000000000;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/qemu/roms/u-boot/common/cmd_exit.c b/qemu/roms/u-boot/common/cmd_exit.c new file mode 100644 index 000000000..c7892333b --- /dev/null +++ b/qemu/roms/u-boot/common/cmd_exit.c @@ -0,0 +1,26 @@ +/* + * Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int r; + + r = 0; + if (argc > 1) + r = simple_strtoul(argv[1], NULL, 10); + + return -r - 2; +} + +U_BOOT_CMD( + exit, 2, 1, do_exit, + "exit script", + "" +);