]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg\Library\UefiShellCEntryLib\UefiShellCEntryLib.c:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 May 2013 20:39:04 +0000 (20:39 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 May 2013 20:39:04 +0000 (20:39 +0000)
Return actual error codes instead of EFI_UNSUPPORTED for all errors.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: jaben.carsey@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14368 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c

index 60b15fe8a0ab4c67b61bf972bb2fe1b5a662e79a..525c1f14cff0a8a38f12041c7bce447544d15693 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides application point extension for "C" style main funciton\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, 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
   An application that uses UefiShellCEntryLib must have a ShellAppMain\r
   function as prototyped in Include/Library/ShellCEntryLib.h.\r
 \r
+  Note that the Shell uses POSITIVE integers for error values, while UEFI\r
+  uses NEGATIVE values.  If the application is to be used within a script,\r
+  it needs to return one of the SHELL_STATUS values defined in ShellBase.h.\r
+\r
   @param  ImageHandle  The image handle of the UEFI Application.\r
   @param  SystemTable  A pointer to the EFI System Table.\r
 \r
@@ -91,9 +95,5 @@ ShellCEntryLib (
       ASSERT(FALSE);\r
     }\r
   }\r
-  if (ReturnFromMain == 0) {\r
-    return (EFI_SUCCESS);\r
-  } else {\r
-    return (EFI_UNSUPPORTED);\r
-  }\r
+  return ReturnFromMain;\r
 }\r