blob: 7c0affa5eb50e6ad73ff20b9dfa57d52ff86e861 [file] [log] [blame]
Heiko Stuebner6671aed2020-06-30 01:05:45 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
4 */
5
Tom Rinidec7ea02024-05-20 13:35:03 -06006#include <vsprintf.h>
Heiko Stuebner6671aed2020-06-30 01:05:45 +02007#include <command.h>
8
9static int do_panic(struct cmd_tbl *cmdtp, int flag, int argc,
10 char * const argv[])
11{
12 char *text = (argc < 2) ? "" : argv[1];
13
14 panic(text);
15
16 return CMD_RET_SUCCESS;
17}
18
19U_BOOT_CMD(
20 panic, 2, 1, do_panic,
21 "Panic with optional message",
22 "[message]"
23);