diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2007-11-13 19:29:16 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-11-14 13:39:10 -0800 |
commit | b41eacb1069eeefd630d807b1587247e6d89628c (patch) | |
tree | c4235cd685b1cf4550ac7a528d31a85840e7a110 | |
parent | c87f78372ebdb4f1ef7a37fd5628e5e1dfd571d0 (diff) |
Fix the feature determining ELF32/ELF64 automatically
Hi,
This patch fixes the problem that the kexec command cannot determine
ELF32/ELF64 automatically.
On i386 system, the kexec command always determined an ELF32 /proc/vmcore
even if the memory is 4GB or larger, because of referring the outside
of the array "range[]".
Thanks
Ken'ichi Ohmichi
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 729ce00..60bd8c5 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -496,7 +496,7 @@ static enum coretype get_core_type(struct kexec_info *info, if (ranges == 0) return CORE_TYPE_ELF64; - if (range[ranges].end > 0xFFFFFFFFUL) + if (range[ranges - 1].end > 0xFFFFFFFFUL) return CORE_TYPE_ELF64; else return CORE_TYPE_ELF32; |