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

Function ChangeMappedDrive

ShellPkg/Application/Shell/Shell.c:2201–2228  ·  view source on GitHub ↗

Handle a request to change the current file system. @param[in] CmdLine The passed in command line. @retval EFI_SUCCESS The operation was successful. **/

Source from the content-addressed store, hash-verified

2199 @retval EFI_SUCCESS The operation was successful.
2200**/
2201EFI_STATUS
2202ChangeMappedDrive(
2203 IN CONST CHAR16 *CmdLine
2204 )
2205{
2206 EFI_STATUS Status;
2207// Status = EFI_SUCCESS;
2208
2209 //
2210 // make sure we are the right operation
2211 //
2212// ASSERT(CmdLine[(StrLen(CmdLine)-1)] == L':' && StrStr(CmdLine, L" ") == NULL);
2213
2214
2215 //
2216 // Call the protocol API to do the work
2217 //
2218 Status = ShellInfoObject.NewEfiShellProtocol->SetCurDir(NULL, CmdLine);
2219
2220 //
2221 // Report any errors
2222 //
2223 if (EFI_ERROR(Status)) {
2224 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_INVALID_MAPPING), ShellInfoObject.HiiHandle, CmdLine);
2225 }
2226
2227 return (Status);
2228}
2229
2230/**
2231 Reprocess the command line to direct all -? to the help command.

Callers 1

RunShellCommandFunction · 0.85

Calls 1

ShellPrintHiiExFunction · 0.85

Tested by

no test coverage detected