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

Go to the source code of this file.

Functions

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameLevel1 (VOID)
 
EFI_STATUS EFIAPI ShellLevel1CommandsLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI ShellLevel1CommandsLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
BOOLEAN TestNodeForMove (IN CONST LIST_MANIP_FUNC Function, IN CONST CHAR16 *DecrementerTag, IN CONST CHAR16 *IncrementerTag, IN CONST CHAR16 *Label OPTIONAL, IN OUT SCRIPT_FILE *ScriptFile, IN CONST BOOLEAN MovePast, IN CONST BOOLEAN FindOnly, IN CONST SCRIPT_COMMAND_LIST *CommandNode, IN OUT UINTN *TargetCount)
 
BOOLEAN MoveToTag (IN CONST LIST_MANIP_FUNC Function, IN CONST CHAR16 *DecrementerTag, IN CONST CHAR16 *IncrementerTag, IN CONST CHAR16 *Label OPTIONAL, IN OUT SCRIPT_FILE *ScriptFile, IN CONST BOOLEAN MovePast, IN CONST BOOLEAN FindOnly, IN CONST BOOLEAN WrapAroundScript)
 

Variables

STATIC CONST CHAR16 mFileName [] = L"ShellCommands"
 
EFI_HII_HANDLE gShellLevel1HiiHandle = NULL
 

Detailed Description

Main file for NULL named library for level 1 shell command functions.

(C) Copyright 2013 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UefiShellLevel1CommandsLib.c.

Function Documentation

◆ MoveToTag()

BOOLEAN MoveToTag ( IN CONST LIST_MANIP_FUNC  Function,
IN CONST CHAR16 *  DecrementerTag,
IN CONST CHAR16 *  IncrementerTag,
IN CONST CHAR16 *Label  OPTIONAL,
IN OUT SCRIPT_FILE ScriptFile,
IN CONST BOOLEAN  MovePast,
IN CONST BOOLEAN  FindOnly,
IN CONST BOOLEAN  WrapAroundScript 
)

Move the script pointer from 1 tag (line) to another.

It functions so that count starts at 1 and it increases or decreases when it hits the specified tags. when it hits zero the location has been found.

DecrementerTag and IncrementerTag are used to get around for/endfor and similar paired types where the entire middle should be ignored.

If label is used it will be used instead of the count.

Parameters
[in]FunctionThe function to use to enumerate through the list. Normally GetNextNode or GetPreviousNode.
[in]DecrementerTagThe tag to decrement the count at.
[in]IncrementerTagThe tag to increment the count at.
[in]LabelA label to look for.
[in,out]ScriptFileThe pointer to the current script file structure.
[in]MovePastTRUE makes function return 1 past the found location.
[in]FindOnlyTRUE to not change the ScriptFile.
[in]WrapAroundScriptTRUE to wrap end-to-beginning or vise versa in searching.

Definition at line 250 of file UefiShellLevel1CommandsLib.c.

◆ ShellCommandGetManFileNameLevel1()

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameLevel1 ( VOID  )

Return the help text filename. Only used if no HII information found.

Return values
thefilename.

Definition at line 22 of file UefiShellLevel1CommandsLib.c.

◆ ShellLevel1CommandsLibConstructor()

EFI_STATUS EFIAPI ShellLevel1CommandsLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Constructor for the Shell Level 1 Commands library.

Install the handlers for level 1 UEFI Shell 2.0 commands.

Parameters
ImageHandlethe image handle of the process
SystemTablethe EFI System Table pointer
Return values
EFI_SUCCESSthe shell command handlers were installed successfully
EFI_UNSUPPORTEDthe shell level required was not found.

Definition at line 42 of file UefiShellLevel1CommandsLib.c.

◆ ShellLevel1CommandsLibDestructor()

EFI_STATUS EFIAPI ShellLevel1CommandsLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Destructor for the library. free any resources.

Parameters
ImageHandleThe image handle of the process.
SystemTableThe EFI System Table pointer.

Definition at line 83 of file UefiShellLevel1CommandsLib.c.

◆ TestNodeForMove()

BOOLEAN TestNodeForMove ( IN CONST LIST_MANIP_FUNC  Function,
IN CONST CHAR16 *  DecrementerTag,
IN CONST CHAR16 *  IncrementerTag,
IN CONST CHAR16 *Label  OPTIONAL,
IN OUT SCRIPT_FILE ScriptFile,
IN CONST BOOLEAN  MovePast,
IN CONST BOOLEAN  FindOnly,
IN CONST SCRIPT_COMMAND_LIST CommandNode,
IN OUT UINTN TargetCount 
)

Test a node to see if meets the criterion.

It functions so that count starts at 1 and it increases or decreases when it hits the specified tags. when it hits zero the location has been found.

DecrementerTag and IncrementerTag are used to get around for/endfor and similar paired types where the entire middle should be ignored.

If label is used it will be used instead of the count.

Parameters
[in]FunctionThe function to use to enumerate through the list. Normally GetNextNode or GetPreviousNode.
[in]DecrementerTagThe tag to decrement the count at.
[in]IncrementerTagThe tag to increment the count at.
[in]LabelA label to look for.
[in,out]ScriptFileThe pointer to the current script file structure.
[in]MovePastTRUE makes function return 1 past the found location.
[in]FindOnlyTRUE to not change the ScriptFile.
[in]CommandNodeThe pointer to the Node to test.
[in,out]TargetCountThe pointer to the current count.

Definition at line 119 of file UefiShellLevel1CommandsLib.c.

Variable Documentation

◆ gShellLevel1HiiHandle

EFI_HII_HANDLE gShellLevel1HiiHandle = NULL

Definition at line 13 of file UefiShellLevel1CommandsLib.c.

◆ mFileName

STATIC CONST CHAR16 mFileName[] = L"ShellCommands"

Definition at line 12 of file UefiShellLevel1CommandsLib.c.