diff --git a/reactos/boot/freeldr/freeldr/include/ui.h b/reactos/boot/freeldr/freeldr/include/ui.h index b29f41feeeb..d531448d3af 100644 --- a/reactos/boot/freeldr/freeldr/include/ui.h +++ b/reactos/boot/freeldr/freeldr/include/ui.h @@ -66,7 +66,7 @@ VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCS VOID UiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID UiUpdateDateTime(VOID); // Updates the date and time VOID UiInfoBox(PCSTR MessageText); // Displays a info box on the screen -VOID UiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button +VOID UiMessageBox(PCSTR Format, ...); // Displays a message box on the screen with an ok button VOID UiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled diff --git a/reactos/boot/freeldr/freeldr/ui/ui.c b/reactos/boot/freeldr/freeldr/ui/ui.c index 63ea0a6930d..140c1134984 100644 --- a/reactos/boot/freeldr/freeldr/ui/ui.c +++ b/reactos/boot/freeldr/freeldr/ui/ui.c @@ -344,9 +344,15 @@ VOID UiInfoBox(PCSTR MessageText) UiDrawCenteredText(Left, Top, Right, Bottom, MessageText, ATTR(UiTextColor, UiMenuBgColor)); } -VOID UiMessageBox(PCSTR MessageText) +VOID UiMessageBox(PCSTR Format, ...) { - UiVtbl.MessageBox(MessageText); + CHAR Buffer[256]; + va_list ap; + + va_start(ap, Format); + vsnprintf(Buffer, sizeof(Buffer) - sizeof(CHAR), Format, ap); + UiVtbl.MessageBox(Buffer); + va_end(ap); } VOID UiMessageBoxCritical(PCSTR MessageText) diff --git a/reactos/boot/freeldr/freeldr/windows/winldr.c b/reactos/boot/freeldr/freeldr/windows/winldr.c index c3661d9b389..c43e2122d58 100644 --- a/reactos/boot/freeldr/freeldr/windows/winldr.c +++ b/reactos/boot/freeldr/freeldr/windows/winldr.c @@ -325,7 +325,8 @@ WinLdrLoadBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, //FIXME: Maybe remove it from the list and try to continue? if (!Status) { - UiMessageBox("Can't load boot driver!"); + ERR("Can't load boot driver '%wZ'!", &BootDriver->FilePath); + UiMessageBox("Can't load boot driver '%wZ'!", &BootDriver->FilePath); return FALSE; } diff --git a/reactos/boot/freeldr/freeldr/windows/wlregistry.c b/reactos/boot/freeldr/freeldr/windows/wlregistry.c index bd9e75e40ea..c9b35283da5 100644 --- a/reactos/boot/freeldr/freeldr/windows/wlregistry.c +++ b/reactos/boot/freeldr/freeldr/windows/wlregistry.c @@ -538,9 +538,9 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead, /* Get the Driver's Name */ ValueSize = sizeof(ServiceName); rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - //TRACE_CH(REACTOS, "RegEnumKey(): rc %d\n", (int)rc); + TRACE("RegEnumKey(): rc %d\n", (int)rc); - /* Makre sure it's valid, and check if we're done */ + /* Make sure it's valid, and check if we're done */ if (rc == ERROR_NO_MORE_ITEMS) break; if (rc != ERROR_SUCCESS) @@ -627,7 +627,7 @@ WinLdrScanRegistry(IN OUT PLIST_ENTRY BootDriverListHead, FrLdrHeapFree(GroupNameBuffer, TAG_WLDR_NAME); return; } - //TRACE_CH(REACTOS, "Service %d: '%S'\n", (int)Index, ServiceName); + TRACE("Service %d: '%S'\n", (int)Index, ServiceName); /* open driver Key */ rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey);