summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/tools.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-02-21 23:01:11 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-02-21 23:01:11 +0000
commit841067b45e61bb8d5a1394d8bba25db1d2a23ea0 (patch)
tree76a8779a4825eef4fa8655ece532a1e34b601615 /mdk-stage1/tools.c
parent4fc11a304d40052e9515f660e144d925eff8575c (diff)
downloaddrakx-backup-do-not-use-841067b45e61bb8d5a1394d8bba25db1d2a23ea0.tar
drakx-backup-do-not-use-841067b45e61bb8d5a1394d8bba25db1d2a23ea0.tar.gz
drakx-backup-do-not-use-841067b45e61bb8d5a1394d8bba25db1d2a23ea0.tar.bz2
drakx-backup-do-not-use-841067b45e61bb8d5a1394d8bba25db1d2a23ea0.tar.xz
drakx-backup-do-not-use-841067b45e61bb8d5a1394d8bba25db1d2a23ea0.zip
- fix "init" on ppc (do not use minilibc on non-i386 arch's)
- fix segfault of dietlibc-linked apps (broken va_stuff in dietlibc) - cleanup of "init"
Diffstat (limited to 'mdk-stage1/tools.c')
-rw-r--r--mdk-stage1/tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c
index c67748ff5..9d0f083f6 100644
--- a/mdk-stage1/tools.c
+++ b/mdk-stage1/tools.c
@@ -50,11 +50,11 @@ void process_cmdline(void)
log_message("opening /proc/cmdline... ");
- if ((fd = open("/proc/cmdline", O_RDONLY, 0)) == -1)
+ if ((fd = open("/proc/cmdline", O_RDONLY)) == -1)
fatal_error("could not open /proc/cmdline");
size = read(fd, buf, sizeof(buf));
- buf[size-1] = 0;
+ buf[size-1] = '\0'; // -1 to eat the \n
close(fd);
log_message("\t%s", buf);