/** @file\r
Main file for mv shell level 2 function.\r
\r
- Copyright (c) 2013 - 2015, Hewlett-Packard Development Company, L.P.<BR>\r
+ (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
//\r
// If they're the same, or if source is "above" dest on file path tree\r
//\r
- if ( StrCmp(DestPathWalker, SourcePath) == 0 \r
+ if ( StringNoCaseCompare (&DestPathWalker, &SourcePath) == 0 \r
|| StrStr(DestPathWalker, SourcePath) == DestPathWalker \r
) {\r
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MV_INV_SUB), gShellLevel2HiiHandle);\r
OUT VOID **Resp\r
)\r
{\r
- EFI_STATUS Status;\r
+ SHELL_STATUS ShellStatus;\r
\r
//\r
// First we copy the file\r
//\r
- Status = CopySingleFile(Node->FullName, DestPath, Resp, TRUE);\r
+ ShellStatus = CopySingleFile (Node->FullName, DestPath, Resp, TRUE, L"mv");\r
\r
//\r
// Check our result\r
//\r
- if (!EFI_ERROR(Status)) {\r
+ if (ShellStatus == SHELL_SUCCESS) {\r
//\r
// The copy was successful. delete the source file.\r
//\r
CascadeDelete(Node, TRUE);\r
Node->Handle = NULL;\r
+ } else if (ShellStatus == SHELL_ABORTED) {\r
+ return EFI_ABORTED;\r
+ } else if (ShellStatus == SHELL_ACCESS_DENIED) {\r
+ return EFI_ACCESS_DENIED;\r
+ } else if (ShellStatus == SHELL_VOLUME_FULL) {\r
+ return EFI_VOLUME_FULL;\r
+ } else {\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
- return (Status);\r
+ return (EFI_SUCCESS);\r
}\r
\r
/**\r
Status = MoveBetweenFileSystems(Node, FullDestPath!=NULL? FullDestPath:DestPath, &Response);\r
} else {\r
Status = MoveWithinFileSystems(Node, DestPath, &Response);\r
+ //\r
+ // Display error status\r
+ //\r
+ if (EFI_ERROR(Status)) {\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"mv", Status);\r
+ }\r
}\r
\r
//\r
// Check our result\r
//\r
if (EFI_ERROR(Status)) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
if (Status == EFI_SECURITY_VIOLATION) {\r
ShellStatus = SHELL_SECURITY_VIOLATION;\r