summaryrefslogtreecommitdiff
path: root/scripts/modpost.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-15 15:19:07 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-15 15:19:07 -0800
commit4a1168133703a3132e104f99ed8dbe393e2983ad (patch)
treea4cd428b8a6b6c1a6d9c4535f658263eea6d395a /scripts/modpost.h
parent2d86075a5d9145a177dd216d785f55b0c67a3569 (diff)
[PATCH] kbuild: fix modpost when used with O=
From: Sam Ravnborg <sam@ravnborg.org> modpost or to be more specific sumversion.c was not behaving correct when used with O= and MODULE_VERSION was used. Previously it failed to use local .h when calculation the md-sum in case of a O= build. The following patch introduces the following: - A generic get_next_line() - Check that the topmost part of the directory matches - Using strrch when checking for file with suffix .o - Use NOFAIL for allocations in sumversion - Avoid memory leak in new_module The generic get_next_line will pay off when Andreas implmentation of storing symbol addresses in a seperate file is introduced.
Diffstat (limited to 'scripts/modpost.h')
-rw-r--r--scripts/modpost.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/modpost.h b/scripts/modpost.h
index 2890845dad3e..0b18b4192a63 100644
--- a/scripts/modpost.h
+++ b/scripts/modpost.h
@@ -53,6 +53,9 @@ static inline void __endian(const void *src, void *dest, unsigned int size)
#endif
+#define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__, #ptr)
+void *do_nofail(void *ptr, const char *file, int line, const char *expr);
+
struct buffer {
char *p;
int pos;
@@ -95,4 +98,5 @@ void maybe_frob_version(const char *modfilename,
unsigned long modinfo_offset);
void *grab_file(const char *filename, unsigned long *size);
+char* get_next_line(unsigned long *pos, void *file, unsigned long size);
void release_file(void *file, unsigned long size);