TianoCore EDK2 master
Loading...
Searching...
No Matches
Help.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS LexicalInsertIntoList (IN OUT CHAR16 **DestList, IN OUT UINTN *DestSize, IN CONST CHAR16 *Item)
 
EFI_STATUS CopyListOfCommandNames (IN OUT CHAR16 **DestList, IN OUT UINTN *DestSize, IN CONST COMMAND_LIST *SourceList)
 
STATIC EFI_STATUS CopyListOfCommandNamesWithDynamic (IN OUT CHAR16 **DestList, IN OUT UINTN *DestSize)
 
EFI_STATUS PrintDynamicCommandHelp (IN CONST CHAR16 *CommandToGetHelpOn, IN CONST CHAR16 *SectionToGetHelpOn, IN BOOLEAN PrintCommandText)
 
SHELL_STATUS EFIAPI ShellCommandRunHelp (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC CONST SHELL_PARAM_ITEM ParamList []
 

Detailed Description

Main file for Help shell level 3 function.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2014, ARM Limited. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Help.c.

Function Documentation

◆ CopyListOfCommandNames()

EFI_STATUS CopyListOfCommandNames ( IN OUT CHAR16 **  DestList,
IN OUT UINTN DestSize,
IN CONST COMMAND_LIST SourceList 
)

function to add each command name from the linked list to the string list.

the resultant list is a double NULL terminated list of NULL terminated strings.

Parameters
[in,out]DestListdouble pointer to the list. may be NULL.
[in,out]DestSizepointer to the size of list. may be 0, if DestList is NULL.
[in]SourceListthe double linked list of commands.
Return values
EFI_SUCCESSthe operation was successful.

Definition at line 113 of file Help.c.

◆ CopyListOfCommandNamesWithDynamic()

STATIC EFI_STATUS CopyListOfCommandNamesWithDynamic ( IN OUT CHAR16 **  DestList,
IN OUT UINTN DestSize 
)

function to add each dynamic command name to the string list.

the resultant list is a double NULL terminated list of NULL terminated strings.

Parameters
[in,out]DestListdouble pointer to the list. may be NULL.
[in,out]DestSizepointer to the size of list. may be 0, if DestList is NULL.
Return values
EFI_SUCCESSthe operation was successful.
Returns
an error from HandleProtocol

Definition at line 145 of file Help.c.

◆ LexicalInsertIntoList()

EFI_STATUS LexicalInsertIntoList ( IN OUT CHAR16 **  DestList,
IN OUT UINTN DestSize,
IN CONST CHAR16 *  Item 
)

function to insert string items into a list in the correct alphabetical place

the resultant list is a double NULL terminated list of NULL terminated strings.

upon successful return the memory must be caller freed (unless passed back in via a loop where it will get reallocated).

Parameters
[in,out]DestListdouble pointer to the list. may be NULL.
[in,out]DestSizepointer to the size of list. may be 0, if DestList is NULL.
[in]Itemthe item to insert.
Return values
EFI_SUCCESSthe operation was successful.

Definition at line 34 of file Help.c.

◆ PrintDynamicCommandHelp()

EFI_STATUS PrintDynamicCommandHelp ( IN CONST CHAR16 *  CommandToGetHelpOn,
IN CONST CHAR16 *  SectionToGetHelpOn,
IN BOOLEAN  PrintCommandText 
)

Attempt to print help from a dynamically added command.

Parameters
[in]CommandToGetHelpOnThe unicode name of the command that help is requested on.
[in]SectionToGetHelpOnPointer to the section specifier(s).
[in]PrintCommandTextPrint the command followed by the help content or just help.
Return values
EFI_SUCCESSThe help was displayed
EFI_NOT_FOUNDThe command name could not be found
EFI_DEVICE_ERRORThe help data format was incorrect.

Definition at line 201 of file Help.c.

◆ ShellCommandRunHelp()

SHELL_STATUS EFIAPI ShellCommandRunHelp ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'help' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 298 of file Help.c.

Variable Documentation

◆ ParamList

Initial value:
= {
{ L"-usage", TypeFlag },
{ L"-section", TypeMaxValue },
{ L"-verbose", TypeFlag },
{ L"-v", TypeFlag },
{ NULL, TypeMax }
}
#define NULL
Definition: Base.h:319
@ TypeMaxValue
A flag followed by all the command line data before the next flag.
Definition: ShellLib.h:704
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699

Definition at line 282 of file Help.c.