Updating level 1 commands.

exit - correctly convert the parameter to the return code.
for  - update string-to-number conversion.
if   - use shell string-to-number conversion and add comments.
stall- add command

main lib files:
add comments, clarify user visible strings, add stall.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11420 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2011-03-25 20:43:03 +00:00
parent a47c681fc0
commit 77dcec128b
8 changed files with 413 additions and 135 deletions

View File

@ -1,7 +1,7 @@
/** @file
Main file for NULL named library for level 1 shell command functions.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -12,6 +12,9 @@
**/
#if !defined (_UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_)
#define _UEFI_SHELL_LEVEL1_COMMANDS_LIB_H_
#include <Uefi.h>
#include <ShellBase.h>
@ -39,6 +42,19 @@
extern EFI_HANDLE gShellLevel1HiiHandle;
extern CONST EFI_GUID gShellLevel1HiiGuid;
/**
Function for 'stall' command.
@param[in] ImageHandle Handle to the Image (NULL if Internal).
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
**/
SHELL_STATUS
EFIAPI
ShellCommandRunStall (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Function for 'exit' command.
@ -156,16 +172,27 @@ LIST_ENTRY *
);
/**
Function to move to a spacified tag in a script file structure.
Move the script pointer from 1 tag (line) to another.
@param[in] Function The pointer to the function to move with.
@param[in] DecrementerTag The pointer to a string to decrement upon finding.
@param[in] IncrementerTag The pointer to a string to increment upon finding.
@param[in] Label A Label to look for.
@param[in] ScriptFile The script file structure to look in.
@param[in] MovePast TRUE to go to the element just after the found one. FALSE otherwise.
@param[in] FindOnly FALSE to change the execution point in the script file structure. TRUE otherwise.
@param[in] WrapAroundScript TRUE to go to begining when end is hit, or vise versa. FALSE otherwise.
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.
@param[in] Function The function to use to enumerate through the
list. Normally GetNextNode or GetPreviousNode.
@param[in] DecrementerTag The tag to decrement the count at.
@param[in] IncrementerTag The tag to increment the count at.
@param[in] Label A label to look for.
@param[in,out] ScriptFile The pointer to the current script file structure.
@param[in] MovePast TRUE makes function return 1 past the found
location.
@param[in] FindOnly TRUE to not change the ScriptFile.
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
searching.
**/
BOOLEAN
EFIAPI
@ -174,9 +201,11 @@ MoveToTag (
IN CONST CHAR16 *DecrementerTag,
IN CONST CHAR16 *IncrementerTag,
IN CONST CHAR16 *Label OPTIONAL,
IN SCRIPT_FILE *ScriptFile,
IN OUT SCRIPT_FILE *ScriptFile,
IN CONST BOOLEAN MovePast,
IN CONST BOOLEAN FindOnly,
IN CONST BOOLEAN WrapAroundScript
);
#endif