MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ParseCommandLine

Function ParseCommandLine

BaseTools/Source/C/EfiRom/EfiRom.c:898–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898static
899int
900ParseCommandLine (
901 int Argc,
902 char *Argv[],
903 OPTIONS *Options
904 )
905/*++
906
907Routine Description:
908
909 Given the Argc/Argv program arguments, and a pointer to an options structure,
910 parse the command-line options and check their validity.
911
912
913Arguments:
914
915 Argc - standard C main() argument count
916 Argv[] - standard C main() argument list
917 Options - pointer to a structure to store the options in
918
919Returns:
920
921 STATUS_SUCCESS success
922 non-zero otherwise
923
924--*/
925{
926 FILE_LIST *FileList;
927 FILE_LIST *PrevFileList;
928 UINT32 FileFlags;
929 UINT32 ClassCode;
930 UINT32 CodeRevision;
931 EFI_STATUS Status;
932 INTN ReturnStatus;
933 BOOLEAN EfiRomFlag;
934 UINT64 TempValue;
935 char *OptionName;
936 UINT16 *DevIdList;
937
938 ReturnStatus = 0;
939 FileFlags = 0;
940 EfiRomFlag = FALSE;
941
942 //
943 // Clear out the options
944 //
945 memset ((char *) Options, 0, sizeof (OPTIONS));
946
947 //
948 // To avoid compile warnings
949 //
950 FileList = PrevFileList = NULL;
951
952 Options->DevIdList = NULL;
953 Options->DevIdCount = 0;
954
955 ClassCode = 0;

Callers 1

mainFunction · 0.85

Calls 10

AsciiStringToUint64Function · 0.85
VersionFunction · 0.70
memsetFunction · 0.50
UsageFunction · 0.50
ErrorFunction · 0.50
reallocFunction · 0.50
strlenFunction · 0.50
strncpyFunction · 0.50
mallocFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected