diff options
Diffstat (limited to 'mdk-stage1/rescue-gui.c')
-rw-r--r-- | mdk-stage1/rescue-gui.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/mdk-stage1/rescue-gui.c b/mdk-stage1/rescue-gui.c index e9cd2495e..c7aae6126 100644 --- a/mdk-stage1/rescue-gui.c +++ b/mdk-stage1/rescue-gui.c @@ -1,5 +1,5 @@ /* - * Guillaume Cottenceau (gc@mandriva.com) + * Guillaume Cottenceau (gc) * * Copyright 2001 Mandriva * @@ -27,6 +27,7 @@ #include <sys/ioctl.h> #include <linux/unistd.h> #include <sys/select.h> +#include <linux/reboot.h> #include "config-stage1.h" #include "frontend.h" @@ -35,13 +36,9 @@ #include <sys/syscall.h> -#define LINUX_REBOOT_MAGIC1 0xfee1dead -#define LINUX_REBOOT_MAGIC2 672274793 -#define BMAGIC_REBOOT 0x01234567 - static inline long reboot(void) { - return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, BMAGIC_REBOOT, 0); + return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART, 0); } #if defined(__i386__) || defined(__x86_64__) @@ -50,9 +47,9 @@ static inline long reboot(void) char * env[] = { "PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sbin:/mnt/usr/sbin:/mnt/bin:/mnt/usr/bin", - "LD_LIBRARY_PATH=/lib:/usr/lib:/mnt/lib:/mnt/usr/lib:/usr/X11R6/lib:/mnt/usr/X11R6/lib" -#if defined(__x86_64__) || defined(__ppc64__) - ":/lib64:/usr/lib64:/usr/X11R6/lib64:/mnt/lib64:/mnt/usr/lib64:/mnt/usr/X11R6/lib64" + "LD_LIBRARY_PATH=/lib:/usr/lib:/mnt/lib:/mnt/usr/lib" +#if defined(__x86_64__) + ":/lib64:/usr/lib64:/mnt/lib64:/mnt/usr/lib64" #endif , "HOME=/", @@ -156,7 +153,7 @@ void unmount_filesystems(void) for (i = nb = 0; i < numfs; i++) if (fs[i].mounted) { printf("\t%s umount failed\n", fs[i].name); - if (strcmp(fs[i].fs, "ext2") == 0) nb++; /* don't count not-ext2 umount failed */ + if (strcmp(fs[i].fs, "ext4") == 0) nb++; /* don't count not-ext4 umount failed */ } if (nb) { @@ -169,7 +166,6 @@ void unmount_filesystems(void) /* ------ UUURGH -- this is dirrrrrttttyyyyyy */ void probe_that_type(void) {} -void exit_bootsplash(void) {} int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) |