Revision: 14368
          http://edk2.svn.sourceforge.net/edk2/?rev=14368&view=rev
Author:   darylm503
Date:     2013-05-15 20:39:04 +0000 (Wed, 15 May 2013)
Log Message:
-----------
ShellPkg\Library\UefiShellCEntryLib\UefiShellCEntryLib.c:
Return actual error codes instead of EFI_UNSUPPORTED for all errors.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  [email protected]
Reviewed-by:    [email protected]

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c

Modified: trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c 
2013-05-15 18:21:08 UTC (rev 14367)
+++ trunk/edk2/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c 
2013-05-15 20:39:04 UTC (rev 14368)
@@ -1,7 +1,7 @@
 /** @file
   Provides application point extension for "C" style main funciton
 
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
   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
@@ -30,6 +30,10 @@
   An application that uses UefiShellCEntryLib must have a ShellAppMain
   function as prototyped in Include/Library/ShellCEntryLib.h.
 
+  Note that the Shell uses POSITIVE integers for error values, while UEFI
+  uses NEGATIVE values.  If the application is to be used within a script,
+  it needs to return one of the SHELL_STATUS values defined in ShellBase.h.
+
   @param  ImageHandle  The image handle of the UEFI Application.
   @param  SystemTable  A pointer to the EFI System Table.
 
@@ -91,9 +95,5 @@
       ASSERT(FALSE);
     }
   }
-  if (ReturnFromMain == 0) {
-    return (EFI_SUCCESS);
-  } else {
-    return (EFI_UNSUPPORTED);
-  }
+  return ReturnFromMain;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to