Skip to content

Commit 798ea90

Browse files
authored
[FREELDR] Less outdated version-hardcodes (reactos#7384)
Those haven't been groomed anymore for more than 10 years. We had many thousands of different freeldr builds with different behavior and bugs each, but nobody ever did have the slightest motivation to update those hardcoded FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION, FREELOADER_PATCH_VERSION from ver.h. And that is logical, because touching other modules will change the behavior of freeldr as well, so it is absolutely impossible to groom anything like that correctly. Instead we should simply do what we started to do in PR7383, which will at least give some information (the actual sources it was built from) instead of some misleading voodoo-version. This might slightly shrink the size of freeldr as well, but I was too lazy to measure by how much.
1 parent 654c59a commit 798ea90

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

boot/freeldr/freeldr/freeldr.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ DBG_DEFAULT_CHANNEL(WARNING);
2626

2727
/* GLOBALS ********************************************************************/
2828

29-
#define TOSTRING_(X) #X
30-
#define TOSTRING(X) TOSTRING_(X)
31-
32-
const PCSTR FrLdrVersionString =
33-
#if (FREELOADER_PATCH_VERSION == 0)
34-
"FreeLoader v" TOSTRING(FREELOADER_MAJOR_VERSION) "." TOSTRING(FREELOADER_MINOR_VERSION);
35-
#else
36-
"FreeLoader v" TOSTRING(FREELOADER_MAJOR_VERSION) "." TOSTRING(FREELOADER_MINOR_VERSION) "." TOSTRING(FREELOADER_PATCH_VERSION);
37-
#endif
38-
3929
CCHAR FrLdrBootPath[MAX_PATH] = "";
4030

4131
/* FUNCTIONS ******************************************************************/

boot/freeldr/freeldr/include/ver.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,10 @@
1919

2020
#pragma once
2121

22-
/* Just some stuff */
22+
// FreeLoader version defines
23+
// If you add features then you increment the minor version
24+
// If you add major functionality then you increment the major version and zero the minor version
2325
#define VERSION "FreeLoader v3.2"
2426
#define COPYRIGHT "Copyright (C) 1996-" COPYRIGHT_YEAR " ReactOS Project"
2527
#define AUTHOR_EMAIL "<www.reactos.org>"
2628
#define BY_AUTHOR "by ReactOS Project"
27-
28-
// FreeLoader version defines
29-
//
30-
// NOTE:
31-
// If you fix bugs then you increment the patch version
32-
// If you add features then you increment the minor version and zero the patch version
33-
// If you add major functionality then you increment the major version and zero the minor & patch versions
34-
//
35-
#define FREELOADER_MAJOR_VERSION 3
36-
#define FREELOADER_MINOR_VERSION 2
37-
#define FREELOADER_PATCH_VERSION 0
38-
39-
extern const PCSTR FrLdrVersionString;

boot/freeldr/freeldr/ui/tui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ VOID TuiDrawBackdrop(VOID)
293293
/* Draw version text */
294294
TuiDrawText(2,
295295
1,
296-
FrLdrVersionString,
296+
VERSION,
297297
ATTR(UiTitleBoxFgColor, UiTitleBoxBgColor));
298298

299299
/* Draw copyright */

0 commit comments

Comments
 (0)