From 7fd5273476d866f2d67796a3264eb500e27ce094 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sun, 7 Jan 2024 20:54:59 +0100 Subject: [PATCH] Rename Protocol->Register() to Protocol->Install() --- xtldr/includes/xtldr.h | 10 +++++----- xtldr/modules/dummy/dummy.c | 2 +- xtldr/modules/fb_o/framebuf.c | 2 +- xtldr/modules/pecoff_o/pecoff.c | 2 +- xtldr/modules/xtos_o/xtos.c | 2 +- xtldr/protocol.c | 10 +++++----- xtldr/xtldr.c | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/xtldr/includes/xtldr.h b/xtldr/includes/xtldr.h index 38fd516..7a3c4a1 100644 --- a/xtldr/includes/xtldr.h +++ b/xtldr/includes/xtldr.h @@ -204,7 +204,7 @@ BlRegisterBootProtocol(IN PWCHAR SystemType, XTCDECL EFI_STATUS -BlRegisterProtocol(IN PEFI_GUID Guid, +BlInstallProtocol(IN PEFI_GUID Guid, IN PVOID Interface); XTCDECL @@ -345,6 +345,10 @@ BlpInitializeSerialPort(IN ULONG PortNumber, IN ULONG PortAddress, IN ULONG BaudRate); +XTCDECL +EFI_STATUS +BlpInstallXtLoaderProtocol(); + XTCDECL EFI_STATUS BlpLoadConfiguration(); @@ -368,10 +372,6 @@ BlpReadConfigFile(IN CONST PWCHAR ConfigDirectory, IN CONST PWCHAR ConfigFile, OUT PCHAR *ConfigData); -XTCDECL -EFI_STATUS -BlpRegisterXtLoaderProtocol(); - XTCDECL VOID BlpStringFormat(IN BLPRINTCHAR PrintCharRoutine, diff --git a/xtldr/modules/dummy/dummy.c b/xtldr/modules/dummy/dummy.c index 93b99d5..b68dbc7 100644 --- a/xtldr/modules/dummy/dummy.c +++ b/xtldr/modules/dummy/dummy.c @@ -56,5 +56,5 @@ XtLdrModuleMain(IN EFI_HANDLE ImageHandle, XtLdrProto->Boot.RegisterProtocol(L"XTOS", &DummyGuid); /* Register DUMMY protocol as XTOS boot protocol */ - return XtLdrProto->Protocol.Register(&DummyGuid, &BlpDummyProtocol); + return XtLdrProto->Protocol.Install(&DummyGuid, &BlpDummyProtocol); } diff --git a/xtldr/modules/fb_o/framebuf.c b/xtldr/modules/fb_o/framebuf.c index bbff477..769da90 100644 --- a/xtldr/modules/fb_o/framebuf.c +++ b/xtldr/modules/fb_o/framebuf.c @@ -251,5 +251,5 @@ XtLdrModuleMain(IN EFI_HANDLE ImageHandle, XtFramebufferProtocol.PrintDisplayInformation = FbPrintDisplayInformation; /* Register XTOS boot protocol */ - return XtLdrProtocol->Protocol.Register(&Guid, &XtFramebufferProtocol); + return XtLdrProtocol->Protocol.Install(&Guid, &XtFramebufferProtocol); } diff --git a/xtldr/modules/pecoff_o/pecoff.c b/xtldr/modules/pecoff_o/pecoff.c index d9c87d2..2c48a2e 100644 --- a/xtldr/modules/pecoff_o/pecoff.c +++ b/xtldr/modules/pecoff_o/pecoff.c @@ -603,5 +603,5 @@ XtLdrModuleMain(IN EFI_HANDLE ImageHandle, XtPeCoffProtocol.RelocateImage = PeRelocateImage; /* Register PE/COFF protocol */ - return XtLdrProtocol->Protocol.Register(&Guid, &XtPeCoffProtocol); + return XtLdrProtocol->Protocol.Install(&Guid, &XtPeCoffProtocol); } diff --git a/xtldr/modules/xtos_o/xtos.c b/xtldr/modules/xtos_o/xtos.c index ef4a667..f7248dc 100644 --- a/xtldr/modules/xtos_o/xtos.c +++ b/xtldr/modules/xtos_o/xtos.c @@ -542,5 +542,5 @@ XtLdrModuleMain(IN EFI_HANDLE ImageHandle, XtLdrProtocol->Boot.RegisterProtocol(L"XTOS", &Guid); /* Install XTOS protocol */ - return XtLdrProtocol->Protocol.Register(&Guid, &XtBootProtocol); + return XtLdrProtocol->Protocol.Install(&Guid, &XtBootProtocol); } diff --git a/xtldr/protocol.c b/xtldr/protocol.c index dbb2b36..7306f25 100644 --- a/xtldr/protocol.c +++ b/xtldr/protocol.c @@ -506,7 +506,7 @@ BlRegisterBootProtocol(IN PWCHAR SystemType, */ XTCDECL EFI_STATUS -BlRegisterProtocol(IN PEFI_GUID Guid, +BlInstallProtocol(IN PEFI_GUID Guid, IN PVOID Interface) { EFI_HANDLE Handle = NULL; @@ -516,7 +516,7 @@ BlRegisterProtocol(IN PEFI_GUID Guid, } /** - * This routine registers XTLDR protocol for further usage by modules. + * This routine installs XTLDR protocol for further usage by modules. * * @return This routine returns a status code. * @@ -524,7 +524,7 @@ BlRegisterProtocol(IN PEFI_GUID Guid, */ XTCDECL EFI_STATUS -BlpRegisterXtLoaderProtocol() +BlpInstallXtLoaderProtocol() { EFI_GUID Guid = XT_BOOT_LOADER_PROTOCOL_GUID; @@ -556,7 +556,7 @@ BlpRegisterXtLoaderProtocol() BlpLdrProtocol.Memory.GetMemoryMap = BlGetMemoryMap; BlpLdrProtocol.Protocol.GetModulesList = BlGetModulesList; BlpLdrProtocol.Protocol.Open = BlOpenProtocol; - BlpLdrProtocol.Protocol.Register = BlRegisterProtocol; + BlpLdrProtocol.Protocol.Install = BlInstallProtocol; BlpLdrProtocol.Tui.DisplayErrorDialog = BlDisplayErrorDialog; BlpLdrProtocol.Tui.DisplayInfoDialog = BlDisplayInfoDialog; BlpLdrProtocol.Tui.DisplayInputDialog = BlDisplayInputDialog; @@ -569,5 +569,5 @@ BlpRegisterXtLoaderProtocol() /* Register XTLDR loader protocol */ BlDebugPrint(L"Registering XT loader protocol\n"); - return BlRegisterProtocol(&Guid, &BlpLdrProtocol); + return BlInstallProtocol(&Guid, &BlpLdrProtocol); } diff --git a/xtldr/xtldr.c b/xtldr/xtldr.c index 6cf574a..bc23020 100644 --- a/xtldr/xtldr.c +++ b/xtldr/xtldr.c @@ -347,12 +347,12 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, BlDebugPrint(L"WARNING: Failed to disable watchdog timer (Status Code: 0x%lx)\n", Status); } - /* Register loader protocol */ - Status = BlpRegisterXtLoaderProtocol(); + /* Install loader protocol */ + Status = BlpInstallXtLoaderProtocol(); if(Status != STATUS_EFI_SUCCESS) { /* Failed to register loader protocol */ - BlDebugPrint(L"ERROR: Failed to register XTLDR boot protocol (Status Code: 0x%lx)\n", Status); + BlDebugPrint(L"ERROR: Failed to register XTLDR loader protocol (Status Code: 0x%lx)\n", Status); return Status; }