From: Paul Nasrat Date: Thu, 19 Apr 2007 09:25:28 +0000 (+0100) Subject: The following patch fix reverts removal of some lines for the netboot patch. X-Git-Tag: yaboot-1.3.14rc2~8 X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=commitdiff_plain;h=aa67de3649c86c158622391aeec0016645b4f0d1;hp=a5b19d45fb5569f68e56445536296188b2ec0809 The following patch fix reverts removal of some lines for the netboot patch. Signed-off-by: Paulo Ricardo Paz Vital --- diff --git a/second/yaboot.c b/second/yaboot.c index 9b8fcc8..59f7d2e 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -331,6 +331,7 @@ load_config_file(struct boot_fspec_t *fspec) char *conf_file = NULL, *p; struct boot_file_t file; int sz, opened = 0, result = 0; + char conf_path[512]; /* Allocate a buffer for the config file */ conf_file = malloc(CONFIG_FILE_MAX); @@ -339,7 +340,19 @@ load_config_file(struct boot_fspec_t *fspec) goto bail; } + /* 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); + + /* Open it */ + fspec->file = conf_path; result = open_file(fspec, &file); if (result != FILE_ERR_OK) { prom_printf("%s:%d,", fspec->dev, fspec->part); @@ -525,6 +538,8 @@ static int load_my_config_file(struct boot_fspec_t *orig_fspec) strcat(fspec.file, tmp); } + //DEBUG_F("----> mac addr: %s\n", fspec.file); + rc = load_config_file(&fspec); if (rc) goto out;