[PATCH] Accept architectures which partially match

Marc Andre Tanner mat at brain-dump.org
Fri Nov 20 12:38:12 EST 2009


It doesn't make sense to add every possible architecture
family / endianness combination.

Signed-off-by: Marc Andre Tanner <mat at brain-dump.org>
---
 kexec/phys_arch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/phys_arch.c b/kexec/phys_arch.c
index ff8c28b..2b3cbf9 100644
--- a/kexec/phys_arch.c
+++ b/kexec/phys_arch.c
@@ -14,7 +14,7 @@ long physical_arch(void)
 	}
 
 	for (i = 0; arches[i].machine; ++i)
-		if (strcmp(utsname.machine, arches[i].machine) == 0)
+		if (strncmp(utsname.machine, arches[i].machine, strlen(arches[i].machine)) == 0)
 			return arches[i].arch;
 
 	fprintf(stderr, "Unsupported machine type: %s\n",
-- 
1.6.5




More information about the kexec mailing list