aboutsummaryrefslogtreecommitdiff
path: root/ext2load/conffile.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext2load/conffile.c')
-rw-r--r--ext2load/conffile.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ext2load/conffile.c b/ext2load/conffile.c
index 75c771f..6eb475c 100644
--- a/ext2load/conffile.c
+++ b/ext2load/conffile.c
@@ -9,13 +9,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <types.h>
#include <sys/types.h>
#include <ext2_fs.h>
#include <ext2fs.h>
#include "arcboot.h"
-#include <arc.h>
#define _PARM_LIMIT 32
@@ -26,7 +24,7 @@ static char *carray[_PARM_LIMIT+4]; /* 0 is the name,
X+1 ... _PARM_LIMIT are options given on the
command line */
-CHAR** GetConfig(char* config, char* name)
+char** GetConfig(char* config, char* name)
{
char *t, *start, *end;
int i;
@@ -115,7 +113,7 @@ CHAR** GetConfig(char* config, char* name)
return NULL;
}
-CHAR** ReadConfFile(char** partition, const char *filename, char* label)
+char** ReadConfFile(char** partition, const char *filename, char* label)
{
ext2_file_t file;
unsigned size, num_read;
@@ -123,22 +121,22 @@ CHAR** ReadConfFile(char** partition, const char *filename, char* label)
char *conf_file;
if(!OpenFile( *partition, filename, &file ))
- return False;
+ return 0;
size = ext2fs_file_get_size(file);
conf_file = malloc(size);
if( !conf_file ) {
printf("Can't read configuration file - not enough memory\n\r");
- return False;
+ return 0;
}
status = ext2fs_file_read(file,(char*) conf_file, size, &num_read);
if( status ) {
print_ext2fs_error(status);
- return False;
+ return 0;
}
if( size != num_read ) {
printf("Wanted: %u, got %u bytes of configuration file\n\r", size, num_read);
- return False;
+ return 0;
}
return GetConfig(conf_file, label);
}