]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Add error messages to CP when destination file or directory cannot be opene...
authorJaben Carsey <Jaben.carsey@intel.com>
Wed, 14 May 2014 16:55:56 +0000 (16:55 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 May 2014 16:55:56 +0000 (16:55 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15530 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni

index 8fc263f6ba377ca79f24764a02612ea16a111759..da2909d19b242fbc812a5f565093778f815eea27 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for cp shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<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
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -131,6 +131,7 @@ CopySingleFile(
   if (ShellIsDirectory(Source) == EFI_SUCCESS) {\r
     Status = ShellCreateDirectory(Dest, &DestHandle);\r
     if (EFI_ERROR(Status)) {\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_DIR_FAIL), gShellLevel2HiiHandle, Dest);\r
       return (SHELL_ACCESS_DENIED);\r
     }\r
 \r
@@ -159,6 +160,7 @@ CopySingleFile(
     //\r
     Status = ShellOpenFileByName(Dest, &DestHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);\r
     if (EFI_ERROR(Status)) {\r
+      ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_OPEN_FAIL), gShellLevel2HiiHandle, Dest);\r
       return (SHELL_ACCESS_DENIED);\r
     }\r
 \r
index a64091591e0e9542ba030ac7b2047f05526418b4..749d184a7a40fe021c01ac46343f817a74756378 100644 (file)
Binary files a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni and b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni differ