Check the call to lseek in kexec/arch/ppc64/fs2dt.c:add_usable_mem_property-lseek() for errors.
Appart from being a good idea, this is a preparatory patch to remove the farily bogus scemantic of checking and setting errno some time later in functions in kexec/arch/ppc64/fs2dt.c to see if an error occured somewhere. Signed-off-by: Simon Horman <[EMAIL PROTECTED]> Index: kexec-tools-testing/kexec/arch/ppc64/fs2dt.c =================================================================== --- kexec-tools-testing.orig/kexec/arch/ppc64/fs2dt.c 2006-12-11 13:16:24.000000000 +0900 +++ kexec-tools-testing/kexec/arch/ppc64/fs2dt.c 2006-12-11 13:17:12.000000000 +0900 @@ -126,7 +130,9 @@ if (strncmp(bname, "/memory@", 8)) return; - lseek(fd, 0, SEEK_SET); + if (lseek(fd, 0, SEEK_SET) < 0) + die("unrecoverable error: error seeking in \"%s\": %s\n", + pathname, strerror(errno)); if (read(fd, buf, len) != len) die("unrecoverable error: error reading \"%s\": %s\n", pathname, strerror(errno)); -- -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ fastboot mailing list fastboot@lists.osdl.org https://lists.osdl.org/mailman/listinfo/fastboot