Skip to content

Commit

Permalink
ShellPkg/Application: Fix various typos
Browse files Browse the repository at this point in the history
Fix various typos in comments and documentation.

Cc: Ray Ni <[email protected]>
Cc: Zhichao Gao <[email protected]>
Signed-off-by: Antoine Coeur <[email protected]>
Reviewed-by: Philippe Mathieu-Daude <[email protected]>
Reviewed-by: Zhichao Gao <[email protected]>
Signed-off-by: Philippe Mathieu-Daude <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
Coeur authored and mergify[bot] committed Feb 10, 2020
1 parent ba562ca commit 6a5033c
Show file tree
Hide file tree
Showing 16 changed files with 106 additions and 106 deletions.
12 changes: 6 additions & 6 deletions ShellPkg/Application/Shell/ConsoleLogger.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ UpdateDisplayFromHistory(
StringSegment = &Screen[Column];

//
// Find the first char with a different arrribute and make that temporarily NULL
// Find the first char with a different attribute and make that temporarily NULL
// so we can do fewer printout statements. (later) restore that one and we will
// start at that collumn on the next loop.
// start at that column on the next loop.
//
StringSegmentEndChar = CHAR_NULL;
for ( StringSegmentEnd = StringSegment
Expand Down Expand Up @@ -395,7 +395,7 @@ UpdateDisplayFromHistory(
}

/**
Reset the text output device hardware and optionaly run diagnostics
Reset the text output device hardware and optionally run diagnostics
@param This pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
@param ExtendedVerification Indicates that a more extensive test may be performed
Expand Down Expand Up @@ -723,7 +723,7 @@ ConsoleLoggerPrintWithPageBreak(
ConsoleLoggerOutputStringSplit (LineStart, ConsoleInfo);

//
// restore the temp NULL terminator to it's original character
// restore the temp NULL terminator to its original character
//
*((CHAR16*)(Walker+1)) = TempChar;

Expand Down Expand Up @@ -770,7 +770,7 @@ ConsoleLoggerPrintWithPageBreak(
ConsoleLoggerOutputStringSplit (LineStart, ConsoleInfo);

//
// restore the temp NULL terminator to it's original character
// restore the temp NULL terminator to its original character
//
*((CHAR16*)(Walker+1)) = TempChar;

Expand Down Expand Up @@ -1189,7 +1189,7 @@ ConsoleLoggerEnableCursor (
@param[in] ConsoleInfo The pointer to the instance of the console logger information.
This will be used when a mode has changed or a reset ocurred to verify all
This will be used when a mode has changed or a reset occurred to verify all
history buffers.
**/
EFI_STATUS
Expand Down
4 changes: 2 additions & 2 deletions ShellPkg/Application/Shell/ConsoleLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ UpdateDisplayFromHistory(
);

/**
Reset the text output device hardware and optionaly run diagnostics
Reset the text output device hardware and optionally run diagnostics
@param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
@param ExtendedVerification Indicates that a more extensive test may be performed
Expand Down Expand Up @@ -305,7 +305,7 @@ ConsoleLoggerEnableCursor (
@param[in] ConsoleInfo The pointer to the instance of the console logger information.
This will be used when a mode has changed or a reset ocurred to verify all
This will be used when a mode has changed or a reset occurred to verify all
history buffers.
**/
EFI_STATUS
Expand Down
2 changes: 1 addition & 1 deletion ShellPkg/Application/Shell/ConsoleWrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ CloseSimpleTextInOnFile(
}

/**
Reset the text output device hardware and optionaly run diagnostics.
Reset the text output device hardware and optionally run diagnostics.
@param This pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
@param ExtendedVerification Indicates that a more extensive test may be performed
Expand Down
8 changes: 4 additions & 4 deletions ShellPkg/Application/Shell/FileHandleWrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ FileInterfaceStdInRead(
gST->ConOut->QueryMode (gST->ConOut, gST->ConOut->Mode->Mode, &TotalColumn, &TotalRow);

//
// Limit the line length to the buffer size or the minimun size of the
// Limit the line length to the buffer size or the minimum size of the
// screen. (The smaller takes effect)
//
MaxStr = TotalColumn * (TotalRow - 1) - StartColumn;
Expand Down Expand Up @@ -865,7 +865,7 @@ FileInterfaceStdInRead(
//
if (Key.UnicodeChar != CHAR_BACKSPACE && !(Key.UnicodeChar == 0 && Key.ScanCode == SCAN_DELETE)) {
//
// Calulate row and column of the tail of current string
// Calculate row and column of the tail of current string
//
TailRow = Row + (StringLen - StringCurPos + Column + OutputLength) / TotalColumn;
TailColumn = (StringLen - StringCurPos + Column + OutputLength) % TotalColumn;
Expand Down Expand Up @@ -932,7 +932,7 @@ FileInterfaceStdInRead(
}

//
// FILE sytle interfaces for StdIn/StdOut/StdErr
// FILE style interfaces for StdIn/StdOut/StdErr
//
EFI_FILE_PROTOCOL FileInterfaceStdIn = {
EFI_FILE_REVISION,
Expand Down Expand Up @@ -1069,7 +1069,7 @@ FileInterfaceEnvClose(
) {
((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 3] = CHAR_NULL;
//
// If the NewBuffer end with \r\n\0, We will repace '\r' by '\0' and then update TotalSize.
// If the NewBuffer end with \r\n\0, We will replace '\r' by '\0' and then update TotalSize.
//
TotalSize -= sizeof(CHAR16) * 2;
}
Expand Down
6 changes: 3 additions & 3 deletions ShellPkg/Application/Shell/FileHandleWrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ typedef struct {
} SHELL_LINE_LOG;

///
/// FILE sytle interfaces for StdIn.
/// FILE styte interfaces for StdIn.
///
extern EFI_FILE_PROTOCOL FileInterfaceStdIn;

///
/// FILE sytle interfaces for StdOut.
/// FILE styte interfaces for StdOut.
///
extern EFI_FILE_PROTOCOL FileInterfaceStdOut;

///
/// FILE sytle interfaces for StdErr.
/// FILE styte interfaces for StdErr.
///
extern EFI_FILE_PROTOCOL FileInterfaceStdErr;

Expand Down
8 changes: 4 additions & 4 deletions ShellPkg/Application/Shell/Shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ ProcessCommandLine(
}
}
//
// If an argumnent contains a space, then add double quotes before the argument
// If an argument contains a space, then add double quotes before the argument
//
if (StrStr (gEfiShellParametersProtocol->Argv[LoopVar], L" ") != NULL) {
StrnCatGrow(&ShellInfoObject.ShellInitSettings.FileOptions,
Expand All @@ -1102,7 +1102,7 @@ ProcessCommandLine(
return (EFI_OUT_OF_RESOURCES);
}
//
// If an argumnent contains a space, then add double quotes after the argument
// If an argument contains a space, then add double quotes after the argument
//
if (StrStr (gEfiShellParametersProtocol->Argv[LoopVar], L" ") != NULL) {
StrnCatGrow(&ShellInfoObject.ShellInitSettings.FileOptions,
Expand Down Expand Up @@ -1176,7 +1176,7 @@ LocateStartupScript (
}

//
// Try to find 'Startup.nsh' in the execution path defined by the envrionment variable PATH.
// Try to find 'Startup.nsh' in the execution path defined by the environment variable PATH.
//
if ((StartupScriptPath == NULL) || EFI_ERROR (ShellIsFile (StartupScriptPath))) {
SHELL_FREE_NON_NULL (StartupScriptPath);
Expand Down Expand Up @@ -2251,7 +2251,7 @@ SetLastError(
}

/**
Converts the command line to it's post-processed form. this replaces variables and alias' per UEFI Shell spec.
Converts the command line to its post-processed form. this replaces variables and alias' per UEFI Shell spec.
@param[in,out] CmdLine pointer to the command line to update
Expand Down
2 changes: 1 addition & 1 deletion ShellPkg/Application/Shell/Shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ typedef struct {
extern SHELL_INFO ShellInfoObject;

/**
Converts the command line to it's post-processed form. this replaces variables and alias' per UEFI Shell spec.
Converts the command line to its post-processed form. this replaces variables and alias' per UEFI Shell spec.
@param[in,out] CmdLine pointer to the command line to update
Expand Down
8 changes: 4 additions & 4 deletions ShellPkg/Application/Shell/ShellEnvVar.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ FreeEnvironmentVariableList(
@param[in, out] ListHead The pointer to pointer to LIST ENTRY object for
storing this list.
@retval EFI_SUCCESS the list was created sucessfully.
@retval EFI_SUCCESS the list was created successfully.
**/
EFI_STATUS
GetEnvironmentVariableList(
Expand Down Expand Up @@ -233,7 +233,7 @@ GetEnvironmentVariableList(
@param[in] ListHead The pointer to LIST_ENTRY from
GetShellEnvVarList().
@retval EFI_SUCCESS the list was Set sucessfully.
@retval EFI_SUCCESS the list was Set successfully.
**/
EFI_STATUS
SetEnvironmentVariableList(
Expand Down Expand Up @@ -266,7 +266,7 @@ SetEnvironmentVariableList(
FreeEnvironmentVariableList(&VarList.Link);

//
// set all the variables fron the list
// set all the variables from the list
//
for ( Node = (ENV_VAR_LIST*)GetFirstNode(ListHead)
; !IsNull(ListHead, &Node->Link)
Expand Down Expand Up @@ -479,7 +479,7 @@ ShellAddEnvVarToList (
}

//
// If the environment varialbe key doesn't exist in list just insert
// If the environment variable key doesn't exist in list just insert
// a new node.
//
LocalKey = AllocateCopyPool (StrSize(Key), Key);
Expand Down
36 changes: 18 additions & 18 deletions ShellPkg/Application/Shell/ShellEnvVar.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ IsVolatileEnv (
);

/**
Delete a Non-Violatile environment variable.
Delete a Non-Volatile environment variable.
This will use the Runtime Services call SetVariable to remove a non-violatile variable.
This will use the Runtime Services call SetVariable to remove a non-volatile variable.
@param EnvVarName The name of the environment variable in question
@retval EFI_SUCCESS The variable was deleted sucessfully
@retval other An error ocurred
@retval EFI_SUCCESS The variable was deleted successfully
@retval other An error occurred
@sa SetVariable
**/
#define SHELL_DELETE_ENVIRONMENT_VARIABLE(EnvVarName) \
Expand All @@ -61,16 +61,16 @@ IsVolatileEnv (
NULL))

/**
Set a Non-Violatile environment variable.
Set a Non-Volatile environment variable.
This will use the Runtime Services call SetVariable to set a non-violatile variable.
This will use the Runtime Services call SetVariable to set a non-volatile variable.
@param EnvVarName The name of the environment variable in question
@param BufferSize UINTN size of Buffer
@param Buffer Pointer to value to set variable to
@retval EFI_SUCCESS The variable was changed sucessfully
@retval other An error ocurred
@retval EFI_SUCCESS The variable was changed successfully
@retval other An error occurred
@sa SetVariable
**/
#define SHELL_SET_ENVIRONMENT_VARIABLE_NV(EnvVarName,BufferSize,Buffer) \
Expand All @@ -89,8 +89,8 @@ IsVolatileEnv (
@param BufferSize Pointer to the UINTN size of Buffer
@param Buffer Pointer buffer to get variable value into
@retval EFI_SUCCESS The variable's value was retrieved sucessfully
@retval other An error ocurred
@retval EFI_SUCCESS The variable's value was retrieved successfully
@retval other An error occurred
@sa SetVariable
**/
#define SHELL_GET_ENVIRONMENT_VARIABLE(EnvVarName,BufferSize,Buffer) \
Expand All @@ -110,8 +110,8 @@ IsVolatileEnv (
@param BufferSize Pointer to the UINTN size of Buffer
@param Buffer Pointer buffer to get variable value into
@retval EFI_SUCCESS The variable's value was retrieved sucessfully
@retval other An error ocurred
@retval EFI_SUCCESS The variable's value was retrieved successfully
@retval other An error occurred
@sa SetVariable
**/
#define SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(EnvVarName,Atts,BufferSize,Buffer) \
Expand All @@ -122,16 +122,16 @@ IsVolatileEnv (
Buffer))

/**
Set a Violatile environment variable.
Set a Volatile environment variable.
This will use the Runtime Services call SetVariable to set a violatile variable.
This will use the Runtime Services call SetVariable to set a volatile variable.
@param EnvVarName The name of the environment variable in question
@param BufferSize UINTN size of Buffer
@param Buffer Pointer to value to set variable to
@retval EFI_SUCCESS The variable was changed sucessfully
@retval other An error ocurred
@retval EFI_SUCCESS The variable was changed successfully
@retval other An error occurred
@sa SetVariable
**/
#define SHELL_SET_ENVIRONMENT_VARIABLE_V(EnvVarName,BufferSize,Buffer) \
Expand All @@ -147,7 +147,7 @@ IsVolatileEnv (
@param[in, out] List The pointer to pointer to LIST_ENTRY object for
storing this list.
@retval EFI_SUCCESS the list was created sucessfully.
@retval EFI_SUCCESS the list was created successfully.
**/
EFI_STATUS
GetEnvironmentVariableList(
Expand All @@ -164,7 +164,7 @@ GetEnvironmentVariableList(
@param[in] List The pointer to LIST_ENTRY from
GetShellEnvVarList().
@retval EFI_SUCCESS The list was Set sucessfully.
@retval EFI_SUCCESS The list was Set successfully.
**/
EFI_STATUS
SetEnvironmentVariableList(
Expand Down
20 changes: 10 additions & 10 deletions ShellPkg/Application/Shell/ShellManParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ SearchPathForFile(
}

/**
parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
detailed help for any sub section specified in the comma seperated list of
Parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
detailed help for any sub section specified in the comma separated list of
sections provided. If the end of the file or a .TH section is found then
return.
Upon a sucessful return the caller is responsible to free the memory in *HelpText
Upon a successful return the caller is responsible to free the memory in *HelpText
@param[in] Handle FileHandle to read from
@param[in] Sections name of command's sub sections to find
Expand All @@ -193,8 +193,8 @@ SearchPathForFile(
@param[in] Ascii TRUE if the file is ASCII, FALSE otherwise.
@retval EFI_OUT_OF_RESOURCES a memory allocation failed.
@retval EFI_SUCCESS the section was found and its description sotred in
an alloceted buffer.
@retval EFI_SUCCESS the section was found and its description stored in
an allocated buffer.
**/
EFI_STATUS
ManFileFindSections(
Expand Down Expand Up @@ -296,11 +296,11 @@ ManFileFindSections(
/**
Parses a line from a MAN file to see if it is the Title Header. If it is, then
if the "Brief Description" is desired, allocate a buffer for it and return a
copy. Upon a sucessful return the caller is responsible to free the memory in
copy. Upon a successful return the caller is responsible to free the memory in
*BriefDesc
Uses a simple state machine that allows "unlimited" whitespace before and after the
".TH", compares Command and the MAN file commnd name without respect to case, and
".TH", compares Command and the MAN file command name without respect to case, and
allows "unlimited" whitespace and '0' and '1' characters before the Short Description.
The PCRE regex describing this functionality is: ^\s*\.TH\s+(\S)\s[\s01]*(.*)$
where group 1 is the Command Name and group 2 is the Short Description.
Expand Down Expand Up @@ -421,11 +421,11 @@ IsTitleHeader(
}

/**
parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
Parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
"Brief Description" for the .TH section as specified by Command. If the
command section is not found return EFI_NOT_FOUND.
Upon a sucessful return the caller is responsible to free the memory in *BriefDesc
Upon a successful return the caller is responsible to free the memory in *BriefDesc
@param[in] Handle FileHandle to read from
@param[in] Command name of command's section to find as entered on the
Expand Down Expand Up @@ -512,7 +512,7 @@ ManFileFindTitleSection(
information will be returned. If Sections is NULL, then all help text information
available will be returned.
if BriefDesc is NULL, then the breif description will not be savedd seperatly,
if BriefDesc is NULL, then the breif description will not be saved separately,
but placed first in the main HelpText.
@param[in] ManFileName Points to the NULL-terminated UEFI Shell MAN file name.
Expand Down
Loading

0 comments on commit 6a5033c

Please sign in to comment.