diff options
Diffstat (limited to 'mdk-stage1/rescue-gui.c')
| -rw-r--r-- | mdk-stage1/rescue-gui.c | 22 | 
1 files changed, 13 insertions, 9 deletions
| diff --git a/mdk-stage1/rescue-gui.c b/mdk-stage1/rescue-gui.c index fbf23329a..c7aae6126 100644 --- a/mdk-stage1/rescue-gui.c +++ b/mdk-stage1/rescue-gui.c @@ -1,7 +1,7 @@  /* - * Guillaume Cottenceau (gc@mandrakesoft.com) + * Guillaume Cottenceau (gc)   * - * Copyright 2001 Mandrakesoft + * Copyright 2001 Mandriva   *   *   * This software may be freely redistributed under the terms of the GNU @@ -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" @@ -34,7 +35,11 @@  #include "params.h"  #include <sys/syscall.h> -#define reboot(...) syscall(__NR_reboot, __VA_ARGS__) + +static inline long reboot(void) +{ +	return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART, 0); +}  #if defined(__i386__) || defined(__x86_64__)  #define ENABLE_RESCUE_MS_BOOT 1 @@ -42,9 +47,9 @@  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=/", @@ -148,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) { @@ -161,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))) @@ -233,7 +237,7 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))                          sync(); sync();  			printf("rebooting system\n");  			sleep(2); -			reboot(0xfee1dead, 672274793, 0x01234567); +			reboot();  		}  		if (ptr_begins_static_str(choice, doc)) {  			binary = "/usr/bin/rescue-doc"; | 
