From 2cd245ada4d4e7f457b6852c146260dd30f154ca Mon Sep 17 00:00:00 2001 From: Florian Lohoff Date: Sun, 5 Oct 2008 11:48:37 +0000 Subject: Remove arc specific alternate partition search This is a regression and needs solving. The right solution would be to get the prom_get_partition to return a list of partitions and try them all one after the other. --- ext2load/conffile.c | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/ext2load/conffile.c b/ext2load/conffile.c index 0bcc2b7..75c771f 100644 --- a/ext2load/conffile.c +++ b/ext2load/conffile.c @@ -122,39 +122,8 @@ CHAR** ReadConfFile(char** partition, const char *filename, char* label) errcode_t status; char *conf_file; - if(!OpenFile( *partition, filename, &file )){ - /* OSLoadPartition seems to be wrong, but don't give up now */ - int npart,i; - char *part,*spart; - - /* the user wants to boot a file directly out of the filesystem - * don't try to fixup OSLoadPartition for him in this case */ - if(label[0] == '/') { - return False; - } - printf("Can't open configuration file. Trying other partitions\n\r"); - spart = ArcGetEnvironmentVariable("SystemPartition"); - if(! spart ) { - printf("Couldn't get SystemPartition, weird."); - return False; - } - part = strdup(spart); - npart = part[strlen(part)-2] - '0'; - for(i = 0; i < npart; i++) { - part[strlen(part)-2] = '0' + i; -#if DEBUG - printf("Trying %s\n\r", part); -#endif - /* we found it, good */ - if(OpenFile( part, filename, &file )) { - printf("Please adjust OSLoadPartition to %s\n\r", part); - *partition = part; - break; - } - } - if( i == npart ) - return False; - } + if(!OpenFile( *partition, filename, &file )) + return False; size = ext2fs_file_get_size(file); conf_file = malloc(size); @@ -171,5 +140,5 @@ CHAR** ReadConfFile(char** partition, const char *filename, char* label) printf("Wanted: %u, got %u bytes of configuration file\n\r", size, num_read); return False; } - return GetConfig(conf_file, label); + return GetConfig(conf_file, label); } -- cgit v1.2.3