diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-05-26 23:26:31 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-05-28 10:06:43 +1000 |
commit | 1bcd04baaa3091410bf33758d1422ff172254da1 (patch) | |
tree | 7fea5ff549daab9534580e176f3527d44c328b37 /kexec/arch/i386/x86-linux-setup.c | |
parent | 58b6174928951d91cc6d23db6373ad40c2c978d8 (diff) |
EDD fix
This patch fixes EDD support where the BIOS reports a length lower than the
actual length of raw_data in sysfs. That's no problem -- the check only
needs to catch the case where the sysfs file is *smaller* than the
BIOS reported length.
Also add a newline at the end of the error message.
The problem was introduced in 3bf0213789d56054f601c5a06372f78567aacdd9 by
myself, the initial EDD implementation.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386/x86-linux-setup.c')
-rw-r--r-- | kexec/arch/i386/x86-linux-setup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c index 05a087e..cbb9d30 100644 --- a/kexec/arch/i386/x86-linux-setup.c +++ b/kexec/arch/i386/x86-linux-setup.c @@ -254,9 +254,9 @@ static int read_edd_raw_data(const char *dir, struct edd_info *edd_info) len = ((uint16_t *)edd_info->edd_device_params)[0]; dbgprintf("EDD raw data has length %d\n", len); - if (read_chars != len) { + if (read_chars < len) { fprintf(stderr, "BIOS reported EDD length of %hd but only " - "%d chars read.", len, (int)read_chars); + "%d chars read.\n", len, (int)read_chars); return -1; } |