Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
char *conf_file = NULL, *p;
struct boot_file_t file;
int sz, opened = 0, result = 0;
char *conf_file = NULL, *p;
struct boot_file_t file;
int sz, opened = 0, result = 0;
/* Allocate a buffer for the config file */
conf_file = malloc(CONFIG_FILE_MAX);
/* Allocate a buffer for the config file */
conf_file = malloc(CONFIG_FILE_MAX);
+ /* Build the path to the file */
+ if (_machine == _MACH_chrp)
+ strcpy(conf_path, "/etc/");
+ else
+ conf_path[0] = 0;
+ if (fspec->file && *fspec->file)
+ strcat(conf_path, fspec->file);
+ else
+ strcat(conf_path, CONFIG_FILE_NAME);
+
+
+ fspec->file = conf_path;
result = open_file(fspec, &file);
if (result != FILE_ERR_OK) {
prom_printf("%s:%d,", fspec->dev, fspec->part);
result = open_file(fspec, &file);
if (result != FILE_ERR_OK) {
prom_printf("%s:%d,", fspec->dev, fspec->part);
strcat(fspec.file, tmp);
}
strcat(fspec.file, tmp);
}
+ //DEBUG_F("----> mac addr: %s\n", fspec.file);
+
rc = load_config_file(&fspec);
if (rc)
goto out;
rc = load_config_file(&fspec);
if (rc)
goto out;