summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/minilibc.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-07 23:16:19 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-07 23:16:19 +0000
commit0c0b00ab8086c07600680d41e2f8feefe0f8f150 (patch)
tree0da2100a6944b5efed0aa02d950d98a071bec0cc /mdk-stage1/minilibc.c
parent71d6a65fa155d25fc325d6a9b83a746f5845922e (diff)
downloaddrakx-backup-do-not-use-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar
drakx-backup-do-not-use-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.gz
drakx-backup-do-not-use-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.bz2
drakx-backup-do-not-use-0c0b00ab8086c07600680d41e2f8feefe0f8f150.tar.xz
drakx-backup-do-not-use-0c0b00ab8086c07600680d41e2f8feefe0f8f150.zip
first draft can detect your cdrom drives
soon will launch the stage2
Diffstat (limited to 'mdk-stage1/minilibc.c')
-rw-r--r--mdk-stage1/minilibc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mdk-stage1/minilibc.c b/mdk-stage1/minilibc.c
index e7c374105..c98d87e24 100644
--- a/mdk-stage1/minilibc.c
+++ b/mdk-stage1/minilibc.c
@@ -188,7 +188,7 @@ char * strchr(char * str, int ch)
return NULL;
}
-void print_int(int i)
+void print_int(int fd, int i)
{
char buf[10];
char * chptr = buf + 9;
@@ -207,12 +207,12 @@ void print_int(int i)
i = i / 10;
}
- write(1, chptr + 1, j);
+ write(fd, chptr + 1, j);
}
-void print_str(char * string)
+void print_str(int fd, char * string)
{
- write(1, string, strlen(string));
+ write(fd, string, strlen(string));
}
/* Minimum printf which handles only characters, %d's and %s's */
@@ -235,18 +235,18 @@ void printf(char * fmt, ...)
if (*chptr == '%')
{
*chptr++ = '\0';
- print_str(start);
+ print_str(1, start);
switch (*chptr++)
{
case 's':
strarg = va_arg(args, char *);
- print_str(strarg);
+ print_str(1, strarg);
break;
case 'd':
numarg = va_arg(args, int);
- print_int(numarg);
+ print_int(1, numarg);
break;
}
@@ -254,7 +254,7 @@ void printf(char * fmt, ...)
}
else
{
- print_str(start);
+ print_str(1, start);
start = NULL;
}
}