From: Gabor Juhos Date: Thu, 9 Feb 2012 14:06:44 +0000 (+0000) Subject: generic: fix kexec build error for MIPS with gcc-4.6-linaro X-Git-Tag: reboot~14962 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=31a0451cee20c2aa994f3521de0942bf9bf7ddaa;p=openwrt%2Fstaging%2Fjogo.git generic: fix kexec build error for MIPS with gcc-4.6-linaro SVN-Revision: 30395 --- diff --git a/target/linux/generic/patches-2.6.39/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch b/target/linux/generic/patches-2.6.39/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch index abc89712ba..f31e767a35 100644 --- a/target/linux/generic/patches-2.6.39/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch +++ b/target/linux/generic/patches-2.6.39/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch @@ -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; diff --git a/target/linux/generic/patches-3.0/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch b/target/linux/generic/patches-3.0/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch index abc89712ba..f31e767a35 100644 --- a/target/linux/generic/patches-3.0/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch +++ b/target/linux/generic/patches-3.0/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch @@ -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; diff --git a/target/linux/generic/patches-3.1/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch b/target/linux/generic/patches-3.1/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch index abc89712ba..f31e767a35 100644 --- a/target/linux/generic/patches-3.1/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch +++ b/target/linux/generic/patches-3.1/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch @@ -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; diff --git a/target/linux/generic/patches-3.2/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch b/target/linux/generic/patches-3.2/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch index abc89712ba..f31e767a35 100644 --- a/target/linux/generic/patches-3.2/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch +++ b/target/linux/generic/patches-3.2/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch @@ -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; diff --git a/target/linux/generic/patches-3.3/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch b/target/linux/generic/patches-3.3/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch index abc89712ba..f31e767a35 100644 --- a/target/linux/generic/patches-3.3/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch +++ b/target/linux/generic/patches-3.3/335-mips-kexec-cleanup-kexec-tools-parameter-handling.patch @@ -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;