MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / loadOtherConfigs

Function loadOtherConfigs

Trash/stringTable.c:521–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519
520
521int
522loadOtherConfigs(
523 INTN useDefault
524)
525{
526 char *val, *table;
527 INTN count;
528 char *string;
529 INTN fd, ret;
530
531 if (getValueForKey( "Boot Drivers", &val, &count))
532 {
533 while (string = newStringFromList(&val, &count)) {
534 ret = loadConfigDir(string, useDefault, &table, 0);
535 if (ret >= 0) {
536 if ((fd = openDriverReloc(string)) >= 0) {
537 localPrintf("Loading binary for %s\n",string);
538 if (loadDriver(string, fd) < 0)
539 error("Error loading driver %s\n",string);
540 close(fd);
541 }
542 driverWasLoaded(string, table);
543 free(string);
544 } else {
545 driverIsMissing(string);
546 }
547 if (ret == 1)
548 useDefault = 1; // use defaults from now on
549 }
550 } else {
551 error("Warning: No active drivers specified in system config\n");
552 }
553
554 bootArgs->first_addr0 =
555 (int)bootArgs->configEnd + 1024;
556 return 0;
557}
558
559
560

Callers

nothing calls this directly

Calls 6

getValueForKeyFunction · 0.85
newStringFromListFunction · 0.85
loadConfigDirFunction · 0.85
closeFunction · 0.85
errorFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected