[PATCH] kexec: fix uImage probe false positive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since bf06cf2095 (kexec/uImage: probe to identify a corrupted image)
uImage_probe_kernel() returns 1 for non uImage files. Don't treat this value
as positive probe indication.

Cc: Suzuki K. Poulose <suzuki at in.ibm.com>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 kexec/kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index f13e5124aacc..703d524836b4 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -691,7 +691,7 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
 	}
 	if (!type || guess_only) {
 		for (i = 0; i < file_types; i++) {
-			if (file_type[i].probe(kernel_buf, kernel_size) >= 0)
+			if (file_type[i].probe(kernel_buf, kernel_size) == 0)
 				break;
 		}
 		if (i == file_types) {
-- 
1.8.5.3




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux