From 7282b505c5da686b95f6b2277bbd25a620d263ed Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Wed, 14 May 2014 16:55:56 +0000 Subject: [PATCH] ShellPkg: Add error messages to CP when destination file or directory cannot be opened/created Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Reviewed-by: Tapan Shah Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15530 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/UefiShellLevel2CommandsLib/Cp.c | 4 +++- .../UefiShellLevel2CommandsLib.uni | Bin 112254 -> 112756 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c index 8fc263f6ba..da2909d19b 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c @@ -1,7 +1,7 @@ /** @file Main file for cp shell level 2 function. - Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -131,6 +131,7 @@ CopySingleFile( if (ShellIsDirectory(Source) == EFI_SUCCESS) { Status = ShellCreateDirectory(Dest, &DestHandle); if (EFI_ERROR(Status)) { + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_DIR_FAIL), gShellLevel2HiiHandle, Dest); return (SHELL_ACCESS_DENIED); } @@ -159,6 +160,7 @@ CopySingleFile( // Status = ShellOpenFileByName(Dest, &DestHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0); if (EFI_ERROR(Status)) { + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_OPEN_FAIL), gShellLevel2HiiHandle, Dest); return (SHELL_ACCESS_DENIED); } diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni index a64091591e0e9542ba030ac7b2047f05526418b4..749d184a7a40fe021c01ac46343f817a74756378 100644 GIT binary patch delta 143 zcmezOhV9D-wh5OQO*USBn>IOsPhxUk3ddxbbdJed{8E#DiAPP&o4_%-hhIcBjUkaC zlOcy8l_7;efuV#UA4uji6ae{oKvp?Wu7n|D@_HS4WK&pO7(5w*CL8h#Pxj(;ncR>r jG5JY>$mBC3LX#H&&1c)sH@V}cK=Xn0?FZ5s_xS+;l3p*F delta 27 lcmV+$0ObGl@CN?u29VMLGqKa{W|QFZE`#K0x8!L7kWS?^4~_r; -- 2.39.2