[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 04/19] rename printErrMsg to PrintErrMesgExit
The function prints an error message, then exits the program. Update name in preparation for adding a print-only version. Signed-off-by: Roy Franz <roy.franz@xxxxxxxxxx> --- xen/arch/x86/efi/boot.c | 10 +++++----- xen/arch/x86/efi/efi-shared.c | 6 +++--- xen/include/efi/efi-shared.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/efi/boot.c b/xen/arch/x86/efi/boot.c index 2d32d7b..89d7954 100644 --- a/xen/arch/x86/efi/boot.c +++ b/xen/arch/x86/efi/boot.c @@ -173,7 +173,7 @@ static bool_t __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name, CHAR16 *what = NULL; if ( !name ) - PrintErrMesg(L"No filename", EFI_OUT_OF_RESOURCES); + PrintErrMesgExit(L"No filename", EFI_OUT_OF_RESOURCES); ret = dir_handle->Open(dir_handle, &FileHandle, name, EFI_FILE_MODE_READ, 0); if ( file == &cfg && ret == EFI_NOT_FOUND ) @@ -234,7 +234,7 @@ static bool_t __init read_file(EFI_FILE_HANDLE dir_handle, CHAR16 *name, { PrintErr(what); PrintErr(L" failed for "); - PrintErrMesg(name, ret); + PrintErrMesgExit(name, ret); } return 1; @@ -256,7 +256,7 @@ static void __init edd_put_string(u8 *dst, size_t n, const char *src) while ( n-- && *src ) *dst++ = *src++; if ( *src ) - PrintErrMesg(L"Internal error populating EDD info", + PrintErrMesgExit(L"Internal error populating EDD info", EFI_BUFFER_TOO_SMALL); while ( n-- ) *dst++ = ' '; @@ -478,7 +478,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) status = efi_bs->HandleProtocol(ImageHandle, &loaded_image_guid, (void **)&loaded_image); if ( status != EFI_SUCCESS ) - PrintErrMesg(L"No Loaded Image Protocol", status); + PrintErrMesgExit(L"No Loaded Image Protocol", status); xen_phys_start = (UINTN)loaded_image->ImageBase; if ( (xen_phys_start + loaded_image->ImageSize - 1) >> 32 ) @@ -1127,7 +1127,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) status = efi_bs->ExitBootServices(ImageHandle, map_key); if ( EFI_ERROR(status) ) - PrintErrMesg(L"Cannot exit boot services", status); + PrintErrMesgExit(L"Cannot exit boot services", status); /* Adjust pointers into EFI. */ efi_ct = (void *)efi_ct + DIRECTMAP_VIRT_START; diff --git a/xen/arch/x86/efi/efi-shared.c b/xen/arch/x86/efi/efi-shared.c index 0f8618c..ad668cb 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 PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode) +void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode) { StdOut = StdErr; PrintErr((CHAR16 *)mesg); @@ -217,7 +217,7 @@ EFI_FILE_HANDLE __init get_parent_handle(EFI_LOADED_IMAGE *loaded_image, if ( ret != EFI_SUCCESS ) { PrintErr(L"Open failed for "); - PrintErrMesg(buffer, ret); + PrintErrMesgExit(buffer, ret); } dir_handle->Close(dir_handle); dir_handle = new_handle; @@ -244,7 +244,7 @@ EFI_FILE_HANDLE __init get_parent_handle(EFI_LOADED_IMAGE *loaded_image, EFI_FILE_MODE_READ, 0); if ( ret != EFI_SUCCESS ) { PrintErr(L"Open failed for "); - PrintErrMesg(buffer, ret); + PrintErrMesgExit(buffer, ret); } dir_handle->Close(dir_handle); dir_handle = new_handle; diff --git a/xen/include/efi/efi-shared.h b/xen/include/efi/efi-shared.h index 214a6ff..30a41e4 100644 --- a/xen/include/efi/efi-shared.h +++ b/xen/include/efi/efi-shared.h @@ -37,7 +37,7 @@ CHAR16 *__init s2w(union string *str); char *__init w2s(const union string *str); bool_t __init match_guid(const EFI_GUID *guid1, const EFI_GUID *guid2); -void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode); +void __init PrintErrMesgExit(const CHAR16 *mesg, EFI_STATUS ErrCode); EFI_FILE_HANDLE __init get_parent_handle(EFI_LOADED_IMAGE *loaded_image, CHAR16 **leaf); -- 2.0.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |