aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}