SHA256
1
0
forked from pool/elilo
elilo/elilo-max-conf.diff
Marcus Meissner 3e5d681a2e Accepting request 1189763 from home:fkastl:gcc14
- Add elilo-c99.patch so that the package conforms to the C99
  standard and builds on i586 with GCC 14.

If the request is OK, please forward it to factory soon-ish so that
we can switch the default compiler.

OBS-URL: https://build.opensuse.org/request/show/1189763
OBS-URL: https://build.opensuse.org/package/show/Base:System/elilo?expand=0&rev=26
2024-08-01 19:46:31 +00:00

34 lines
1.3 KiB
Diff

---
fileops.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/fileops.c
+++ b/fileops.c
@@ -396,12 +396,13 @@ fops_setdefaults(struct config_file *def
boot_dev->fops->setdefaults(boot_dev->fops->intf, defconf, kname, maxlen, devpath);
}
i=0; while (i<MAX_DEFAULT_CONFIGS && defconf[i].fname[0] != CHAR_NULL) i += 1;
+ if ((i+1) >= MAX_DEFAULT_CONFIGS) {
#ifdef ELILO_DEBUG
- if ((i+3) >= MAX_DEFAULT_CONFIGS) {
- Print(L"ERROR: i = %d, MAX_DEFAULT_CONFIGS is not large enough\n", i);
- return EFI_INVALID_PARAMETER;
- }
+ Print(L"Warning: MAX_DEFAULT_CONFIGS(%d) is not large enough\n",
+ MAX_DEFAULT_CONFIGS);
#endif
+ i = MAX_DEFAULT_CONFIGS-2;
+ }
StrnCpy(defconf[i].fname, FILEOPS_ARCH_DEFAULT_CONFIG, maxlen-1);
StrnCpy(defconf[i+1].fname, FILEOPS_DEFAULT_CONFIG, maxlen-1);
@@ -409,7 +410,7 @@ fops_setdefaults(struct config_file *def
VERB_PRT(3,Print(L"Default config filename list:\n"));
for (i=0; i<MAX_DEFAULT_CONFIGS; i++) {
if (defconf[i].fname[0] == CHAR_NULL) { break; }
- VERB_PRT(3,Print(L"\t%s\n", defconf[i].fname));
+ VERB_PRT(3,Print(L"\t%2d. %s\n", i+1, defconf[i].fname));
}
#endif