From 06edfc60f329d71ac00d16b29c034149cc5249a9 Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Fri, 16 Sep 2011 11:52:22 -0700 Subject: [PATCH] vbutil: support 64bit x86 This changes the code accept x86.* as an alias for x86 architecture since both x86 and x86_64 systems will handle things identically BUG=chromium-os:20336 TEST=try to use update_kernel.sh on a system running an x86_64 kernel Change-Id: Icf18925bdb8583cd53c6f6254c7493bdec540465 Reviewed-on: http://gerrit.chromium.org/gerrit/7873 Reviewed-by: Bill Richardson Reviewed-by: Randall Spangler Reviewed-by: Che-Liang Chiou Tested-by: Sonny Rao --- utility/vbutil_kernel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utility/vbutil_kernel.c b/utility/vbutil_kernel.c index 821f7519bc..757896aafe 100644 --- a/utility/vbutil_kernel.c +++ b/utility/vbutil_kernel.c @@ -872,7 +872,8 @@ int main(int argc, char* argv[]) { break; case OPT_ARCH: - if (!strcasecmp(optarg, "x86")) + /* check the first 3 characters to also detect x86_64 */ + if (!strncasecmp(optarg, "x86", 3)) arch = ARCH_X86; else if (!strcasecmp(optarg, "arm")) arch = ARCH_ARM;