forked from pool/elilo
34 lines
1.3 KiB
Diff
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
|
||
|
|