mirror of https://github.com/acidanthera/audk.git
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:
parent
ece77e4047
commit
518c8cdc5c
|
@ -71,16 +71,15 @@ STATIC CONST CHAR16 mExecutableExtensions[] = L".NSH;.EFI";
|
||||||
STATIC CONST CHAR16 mStartupScript[] = L"startup.nsh";
|
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.
|
@param[in] CmdLine The command line to parse.
|
||||||
|
|
||||||
@retval TRUE CmdLine has a valid split.
|
@retval A pointer to the | character in CmdLine or NULL if not present.
|
||||||
@retval FALSE CmdLine does not have a valid split.
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ContainsSplit(
|
FindSplit(
|
||||||
IN CONST CHAR16 *CmdLine
|
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);
|
return (TempSpot != NULL && *TempSpot != CHAR_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue