aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Lohoff <flo@rfc822.org>2008-11-29 16:38:00 +0100
committerGuido G√ľnther <agx@sigxcpu.org>2009-04-26 15:26:27 +0200
commitcdacf991017dfc45e8bc16ffd9c70c06ed27db7a (patch)
treea9bb564c99f67acdd1a62b2491a8af12c0c3e8ce
parent7b4ca7013c58a67f1ec41478b1bfc250b3485d28 (diff)
Fix usage of time_t and dev_t in ext2fs lib
-rw-r--r--arclib/prom.c17
-rw-r--r--ext2load/ext2io.c1
-rw-r--r--ext2load/loader.c2
3 files changed, 14 insertions, 6 deletions
diff --git a/arclib/prom.c b/arclib/prom.c
index 5c12ff4..74f243c 100644
--- a/arclib/prom.c
+++ b/arclib/prom.c
@@ -57,6 +57,9 @@ void prom_fatal(const CHAR * message, ...)
ArcEnterInteractiveMode();
}
+void prom_init(void ) {
+}
+
void prom_init_malloc(void)
{
MEMORYDESCRIPTOR *current = NULL;
@@ -170,6 +173,10 @@ static int isEnvVar(const char* arg)
return 0;
}
+void prom_add_arg(char *arg) {
+ iargv[iargc++]=strdup(arg);
+}
+
int prom_parse_args(int argc, char **argv)
{
unsigned long arg;
@@ -203,9 +210,9 @@ int prom_parse_args(int argc, char **argv)
* "OSLoadOptions=auto" on reboot but
* EnvironmentVariable("OSLoadOptions") == NULL
*/
- for( arg = 1; arg < argc; arg++ ) {
+ for( arg = 0; arg < argc; arg++ ) {
if(!isEnvVar(argv[arg])) {
- iargv[iargc++]=strdup(argv[arg]);
+ prom_add_arg(argv[arg]);
} else {
if (OSLoadOptions) {
prom_add_arg(OSLoadOptions);
@@ -216,14 +223,12 @@ int prom_parse_args(int argc, char **argv)
return 0;
}
-void prom_add_arg(char *arg) {
- iargv[iargc++]=strdup(arg);
-}
-
char *prom_get_label(void ) {
if (iargc > 1 && iargv[1]) {
return iargv[1];
}
+ if (OSLoadFilename)
+ return OSLoadFilename;
return "Linux";
}
diff --git a/ext2load/ext2io.c b/ext2load/ext2io.c
index 8776630..888cdc0 100644
--- a/ext2load/ext2io.c
+++ b/ext2load/ext2io.c
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdio.h>
#include <string.h>
+#include <time.h>
#include <sys/types.h>
#include <ext2_fs.h>
diff --git a/ext2load/loader.c b/ext2load/loader.c
index 236c82f..3b8b297 100644
--- a/ext2load/loader.c
+++ b/ext2load/loader.c
@@ -12,6 +12,8 @@
#include <prom.h>
#include <elf.h>
+#include <time.h>
+#include <sys/types.h>
#include <ext2_fs.h>
#include <ext2fs.h>