generic: fix kexec build error for MIPS with gcc-4.6-linaro

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30395 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Gabor Juhos 2012-02-09 14:06:44 +00:00
parent 338ef23a6c
commit c3e541bb71
5 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@
- int i, argc = 0;
- char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf;
+ void __user *buf = NULL;
+ size_t bufsz;
+ size_t size;
+ int i;
@ -92,7 +92,7 @@
+ break;
+ }
+
+ if (i >= image->nr_segments)
+ if (!buf)
+ return;
+
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View File

@ -39,7 +39,7 @@
- int i, argc = 0;
- char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf;
+ void __user *buf = NULL;
+ size_t bufsz;
+ size_t size;
+ int i;
@ -92,7 +92,7 @@
+ break;
+ }
+
+ if (i >= image->nr_segments)
+ if (!buf)
+ return;
+
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View File

@ -39,7 +39,7 @@
- int i, argc = 0;
- char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf;
+ void __user *buf = NULL;
+ size_t bufsz;
+ size_t size;
+ int i;
@ -92,7 +92,7 @@
+ break;
+ }
+
+ if (i >= image->nr_segments)
+ if (!buf)
+ return;
+
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View File

@ -39,7 +39,7 @@
- int i, argc = 0;
- char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf;
+ void __user *buf = NULL;
+ size_t bufsz;
+ size_t size;
+ int i;
@ -92,7 +92,7 @@
+ break;
+ }
+
+ if (i >= image->nr_segments)
+ if (!buf)
+ return;
+
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;

View File

@ -39,7 +39,7 @@
- int i, argc = 0;
- char *bootloader = "kexec";
- int *kexec_argv = (int *)kexec_args[1];
+ void __user *buf;
+ void __user *buf = NULL;
+ size_t bufsz;
+ size_t size;
+ int i;
@ -92,7 +92,7 @@
+ break;
+ }
+
+ if (i >= image->nr_segments)
+ if (!buf)
+ return;
+
+ size = KEXEC_MIPS_ARGV_BUF_SIZE - 1;