From 998c794c7a43c5a69af54da36cf94ee58b9684cc Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 18 May 2017 08:18:14 +0200 Subject: [PATCH] create-diff-object: only check if kernel object starts with "vmlinux" On Debian/Ubuntu, the `vmlinux` from `-dbg` package has a version number appended to it. For example: `/usr/lib/debug/boot/vmlinux-3.13.0-117-generic`. Make it work nonetheless. --- kpatch-build/lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index c65f29f..241b0c7 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -286,7 +286,7 @@ struct lookup_table *lookup_open(char *obj_path, char *symvers_path, ERROR("malloc table"); memset(table, 0, sizeof(*table)); - table->vmlinux = !strcmp(basename(obj_path), "vmlinux"); + table->vmlinux = !strncmp(basename(obj_path), "vmlinux", 7); obj_read(table, obj_path); symvers_read(table, symvers_path);