You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
5e10bd1e07
To align with EDK2, update file license to use BSD+Patent license Signed-off-by: Guo Dong <guo.dong@intel.com>
71 lines
1.4 KiB
C
71 lines
1.4 KiB
C
/** @file
|
|
Shell command `help` to display the list of supported shell commands.
|
|
|
|
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include <Library/ShellLib.h>
|
|
|
|
extern CONST SHELL_COMMAND *mShellDefaultCommands[];
|
|
|
|
/**
|
|
Display list of supported shell commands.
|
|
|
|
@param[in] Shell shell instance
|
|
@param[in] Argc number of command line arguments
|
|
@param[in] Argv command line arguments
|
|
|
|
@retval EFI_SUCCESS
|
|
|
|
**/
|
|
STATIC
|
|
EFI_STATUS
|
|
EFIAPI
|
|
ShellCommandHelpFunc (
|
|
IN SHELL *Shell,
|
|
IN UINTN Argc,
|
|
IN CHAR16 *Argv[]
|
|
);
|
|
|
|
CONST SHELL_COMMAND ShellCommandHelp = {
|
|
L"help",
|
|
L"List supported commands",
|
|
&ShellCommandHelpFunc
|
|
};
|
|
|
|
/**
|
|
Display list of supported shell commands.
|
|
|
|
@param[in] Shell shell instance
|
|
@param[in] Argc number of command line arguments
|
|
@param[in] Argv command line arguments
|
|
|
|
@retval EFI_SUCCESS
|
|
|
|
**/
|
|
STATIC
|
|
EFI_STATUS
|
|
EFIAPI
|
|
ShellCommandHelpFunc (
|
|
IN SHELL *Shell,
|
|
IN UINTN Argc,
|
|
IN CHAR16 *Argv[]
|
|
)
|
|
{
|
|
CONST SHELL_COMMAND **Iter;
|
|
|
|
for (Iter = mShellDefaultCommands; *Iter != NULL; Iter++) {
|
|
ShellPrint (L"%-8s - %s\n", (*Iter)->Name,
|
|
(*Iter)->Desc);
|
|
}
|
|
|
|
for (Iter = Shell->Commands; *Iter != NULL; Iter++) {
|
|
ShellPrint (L"%-8s - %s\n", (*Iter)->Name,
|
|
(*Iter)->Desc);
|
|
}
|
|
|
|
return EFI_SUCCESS;
|
|
}
|