diff mbox

[Xen-devel,RFC,05/19] Add PrintErrMesg function that doesn't exit

Message ID 1403918735-30027-6-git-send-email-roy.franz@linaro.org
State New
Headers show

Commit Message

Roy Franz June 28, 2014, 1:25 a.m. UTC
Add the PrintErrMesg() function that just prints the error information,
but does not exit the program. PrintErrMesgExit() is updated to be composed
of a call to PrintErrMesg() and blexit().

Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
 xen/arch/x86/efi/efi-shared.c | 8 +++++++-
 xen/include/efi/efi-shared.h  | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/xen/arch/x86/efi/efi-shared.c b/xen/arch/x86/efi/efi-shared.c
index ad668cb..d997b5c 100644
--- a/xen/arch/x86/efi/efi-shared.c
+++ b/xen/arch/x86/efi/efi-shared.c
@@ -123,7 +123,7 @@  bool_t __init match_guid(const EFI_GUID *guid1, const EFI_GUID *guid2)
 
 
 /* generic routine for printing error messages */
-void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode)
+void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode)
 {
     StdOut = StdErr;
     PrintErr((CHAR16 *)mesg);
@@ -170,6 +170,12 @@  void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode)
         mesg = NULL;
         break;
     }
+}
+
+
+void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode)
+{
+    PrintErrMesg(mesg, ErrCode);
     blexit(mesg);
 }
 
diff --git a/xen/include/efi/efi-shared.h b/xen/include/efi/efi-shared.h
index 30a41e4..d4b6e13 100644
--- a/xen/include/efi/efi-shared.h
+++ b/xen/include/efi/efi-shared.h
@@ -38,6 +38,7 @@  char *__init w2s(const union string *str);
 bool_t __init match_guid(const EFI_GUID *guid1, const EFI_GUID *guid2);
 
 void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode);
+void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode);
 
 EFI_FILE_HANDLE __init get_parent_handle(EFI_LOADED_IMAGE *loaded_image,
                                                 CHAR16 **leaf);