aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/sumversion.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-12-20 04:54:54 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-12-20 04:54:54 -0500
commit93b8eef1c098efbea2f1fc0be7e3c681f259a7e7 (patch)
tree462cc8c2bc07bbc825dab2a200891a28d8643329 /scripts/mod/sumversion.c
parentInput: libps2 - handle 0xfc responses from devices (diff)
parentLinux 2.6.28-rc9 (diff)
downloadlinux-dev-93b8eef1c098efbea2f1fc0be7e3c681f259a7e7.tar.xz
linux-dev-93b8eef1c098efbea2f1fc0be7e3c681f259a7e7.zip
Merge commit 'v2.6.28-rc9' into next
Diffstat (limited to 'scripts/mod/sumversion.c')
-rw-r--r--scripts/mod/sumversion.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index d9cc6901d680..aadc5223dcdb 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -290,6 +290,15 @@ static int parse_file(const char *fname, struct md4_ctx *md)
release_file(file, len);
return 1;
}
+/* Check whether the file is a static library or not */
+static int is_static_library(const char *objfile)
+{
+ int len = strlen(objfile);
+ if (objfile[len - 2] == '.' && objfile[len - 1] == 'a')
+ return 1;
+ else
+ return 0;
+}
/* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to
* figure out source file. */
@@ -420,7 +429,8 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)
while ((fname = strsep(&sources, " ")) != NULL) {
if (!*fname)
continue;
- if (!parse_source_files(fname, &md))
+ if (!(is_static_library(fname)) &&
+ !parse_source_files(fname, &md))
goto release;
}