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

Go to the source code of this file.

Data Structures

struct  SHELL_FOR_INFO
 

Macros

#define SIZE_OF_SHELL_FOR_INFO   OFFSET_OF (SHELL_FOR_INFO, Set)
 
#define SHELL_FOR_INFO_SIGNATURE   SIGNATURE_32 ('S', 'F', 'I', 's')
 

Functions

BOOLEAN ShellIsValidForNumber (IN CONST CHAR16 *Number)
 
SHELL_STATUS EFIAPI ShellCommandRunEndFor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS InternalUpdateAliasOnList (IN CONST CHAR16 *Alias, IN CONST CHAR16 *CommandString, IN OUT LIST_ENTRY *List)
 
BOOLEAN InternalIsAliasOnList (IN CONST CHAR16 *Alias, IN CONST LIST_ENTRY *List)
 
BOOLEAN InternalRemoveAliasFromList (IN CONST CHAR16 *Alias, IN OUT LIST_ENTRY *List)
 
UINTN ReturnUintn (IN CONST CHAR16 *String)
 
SHELL_STATUS EFIAPI ShellCommandRunFor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Detailed Description

Main file for endfor and for shell level 1 functions.

(C) Copyright 2015 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 For.c.

Macro Definition Documentation

◆ SHELL_FOR_INFO_SIGNATURE

#define SHELL_FOR_INFO_SIGNATURE   SIGNATURE_32 ('S', 'F', 'I', 's')

Definition at line 114 of file For.c.

◆ SIZE_OF_SHELL_FOR_INFO

#define SIZE_OF_SHELL_FOR_INFO   OFFSET_OF (SHELL_FOR_INFO, Set)

Definition at line 113 of file For.c.

Function Documentation

◆ InternalIsAliasOnList()

BOOLEAN InternalIsAliasOnList ( IN CONST CHAR16 *  Alias,
IN CONST LIST_ENTRY List 
)

Find out if an alias is on the given list.

Parameters
[in]AliasThe alias to test for.
[in]ListThe list to search.
Return values
TRUEThe alias is on the list.
FALSEThe alias is not on the list.

Definition at line 186 of file For.c.

◆ InternalRemoveAliasFromList()

BOOLEAN InternalRemoveAliasFromList ( IN CONST CHAR16 *  Alias,
IN OUT LIST_ENTRY List 
)

Remove an alias from the given list.

Parameters
[in]AliasThe alias to remove.
[in,out]ListThe list to search.

Definition at line 223 of file For.c.

◆ InternalUpdateAliasOnList()

EFI_STATUS InternalUpdateAliasOnList ( IN CONST CHAR16 *  Alias,
IN CONST CHAR16 *  CommandString,
IN OUT LIST_ENTRY List 
)

Update the value of a given alias on the list. If the alias is not there then add it.

Parameters
[in]AliasThe alias to test for.
[in]CommandStringThe updated command string.
[in,out]ListThe list to search.
Return values
EFI_SUCCESSThe operation was completed successfully.
EFI_OUT_OF_RESOURCESThere was not enough free memory.

Definition at line 127 of file For.c.

◆ ReturnUintn()

UINTN ReturnUintn ( IN CONST CHAR16 *  String)

Function to determine whether a string is decimal or hex representation of a number and return the number converted from the string.

Parameters
[in]StringString representation of a number
Returns
the number
Return values
(UINTN)(-1)An error ocurred.

Definition at line 267 of file For.c.

◆ ShellCommandRunEndFor()

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

Function for 'endfor' command.

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

Definition at line 59 of file For.c.

◆ ShellCommandRunFor()

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

Function for 'for' command.

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

Definition at line 288 of file For.c.

◆ ShellIsValidForNumber()

BOOLEAN ShellIsValidForNumber ( IN CONST CHAR16 *  Number)

Determine if a valid string is a valid number for the 'for' command.

Parameters
[in]NumberThe pointer to the string representation of the number to test.
Return values
TRUEThe number is valid.
FALSEThe number is not valid.

Definition at line 22 of file For.c.