aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Lohoff <flo@rfc822.org>2008-10-05 11:48:37 +0000
committerGuido Günther <agx@sigxcpu.org>2009-04-26 15:26:27 +0200
commit2cd245ada4d4e7f457b6852c146260dd30f154ca (patch)
treefe0a762197a924a839607f6bae6b622068385009
parent2fbf57533b7037c7b21c6c00a766fee91dd1b8c7 (diff)
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.
-rw-r--r--ext2load/conffile.c37
1 files 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);
}