ShellPkg: Refactor out the searching for pipe characters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14969 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jaben Carsey 2013-12-12 17:27:27 +00:00 committed by jcarsey
parent ece77e4047
commit 518c8cdc5c
1 changed files with 22 additions and 4 deletions

View File

@ -71,16 +71,15 @@ STATIC CONST CHAR16 mExecutableExtensions[] = L".NSH;.EFI";
STATIC CONST CHAR16 mStartupScript[] = L"startup.nsh";
/**
Determine if a command line contains a valid split operation
Find a command line contains a split operation
@param[in] CmdLine The command line to parse.
@retval TRUE CmdLine has a valid split.
@retval FALSE CmdLine does not have a valid split.
@retval A pointer to the | character in CmdLine or NULL if not present.
**/
BOOLEAN
EFIAPI
ContainsSplit(
FindSplit(
IN CONST CHAR16 *CmdLine
)
{
@ -95,6 +94,25 @@ ContainsSplit(
}
}
}
return (TempSpot);
}
/**
Determine if a command line contains a split operation
@param[in] CmdLine The command line to parse.
@retval TRUE CmdLine has a valid split.
@retval FALSE CmdLine does not have a valid split.
**/
BOOLEAN
EFIAPI
ContainsSplit(
IN CONST CHAR16 *CmdLine
)
{
CONST CHAR16 *TempSpot;
TempSpot = FindSplit(CmdLine);
return (TempSpot != NULL && *TempSpot != CHAR_NULL);
}