summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-05 10:54:12 -0800
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-11-03 16:58:54 +0100
commit2cf92a8dcae15de5da20e2190b3a33a87eced6a1 (patch)
treeabf6837a6b2ffd78cb78c087026c63d756d6c040
parent6d910daf60dc4f9bda2204e5ea8ea87fe762a7b2 (diff)
downloadkmod-2cf92a8dcae15de5da20e2190b3a33a87eced6a1.tar.gz
kmod-2cf92a8dcae15de5da20e2190b3a33a87eced6a1.tar.bz2
kmod-2cf92a8dcae15de5da20e2190b3a33a87eced6a1.zip
add packaging
-rw-r--r--packaging/fix-32bits.diff79
-rw-r--r--packaging/kmod-so-version.diff24
2 files changed, 0 insertions, 103 deletions
diff --git a/packaging/fix-32bits.diff b/packaging/fix-32bits.diff
deleted file mode 100644
index 60b72c6..0000000
--- a/packaging/fix-32bits.diff
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/testsuite/init_module.c b/testsuite/init_module.c
-index 814998a..ed8b9fc 100644
---- a/testsuite/init_module.c
-+++ b/testsuite/init_module.c
-@@ -16,6 +16,7 @@
- */
-
- #include <assert.h>
-+#include <elf.h>
- #include <errno.h>
- #include <dirent.h>
- #include <fcntl.h>
-@@ -206,6 +207,12 @@ static inline bool module_is_inkernel(const char *modname)
- return ret;
- }
-
-+static uint8_t elf_identify(void *mem)
-+{
-+ uint8_t *p = mem;
-+ return p[EI_CLASS];
-+}
-+
- TS_EXPORT long init_module(void *mem, unsigned long len, const char *args);
-
- /*
-@@ -225,6 +232,8 @@ long init_module(void *mem, unsigned long len, const char *args)
- const void *buf;
- uint64_t bufsize;
- int err;
-+ uint8_t class;
-+ off_t offset;
-
- init_retcodes();
-
-@@ -237,13 +246,20 @@ long init_module(void *mem, unsigned long len, const char *args)
- kmod_elf_unref(elf);
-
- /*
-- * We couldn't find the module's name inside the ELF file. Just exit
-- * as if it was successful
-+ * We couldn't find the parse the ELF file. Just exit as if it was
-+ * successful
- */
- if (err < 0)
- return 0;
-
-- modname = (char *)buf + offsetof(struct module, name);
-+ /* We need to open both 32 and 64 bits module - hack! */
-+ class = elf_identify(mem);
-+ if (class == ELFCLASS64)
-+ offset = MODULE_NAME_OFFSET_64;
-+ else
-+ offset = MODULE_NAME_OFFSET_32;
-+
-+ modname = (char *)buf + offset;
- mod = find_module(modules, modname);
- if (mod != NULL) {
- errno = mod->errcode;
-diff --git a/testsuite/stripped-module.h b/testsuite/stripped-module.h
-index 9f97dae..19862f3 100644
---- a/testsuite/stripped-module.h
-+++ b/testsuite/stripped-module.h
-@@ -13,6 +13,7 @@ struct list_head {
- };
-
- #define MODULE_NAME_LEN (64 - sizeof(unsigned long))
-+
- struct module
- {
- enum module_state state;
-@@ -24,4 +25,8 @@ struct module
- char name[MODULE_NAME_LEN];
- };
-
-+/* padding */
-+#define MODULE_NAME_OFFSET_64 4 + 4 + 2 * 8
-+#define MODULE_NAME_OFFSET_32 4 + 2 * 4
-+
- #endif
diff --git a/packaging/kmod-so-version.diff b/packaging/kmod-so-version.diff
deleted file mode 100644
index 37ed83d..0000000
--- a/packaging/kmod-so-version.diff
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: kmod-9/Makefile.am
-===================================================================
---- kmod-9.orig/Makefile.am
-+++ kmod-9/Makefile.am
-@@ -33,10 +33,6 @@ SED_PROCESS = \
- %.pc: %.pc.in Makefile
- $(SED_PROCESS)
-
--LIBKMOD_CURRENT=3
--LIBKMOD_REVISION=3
--LIBKMOD_AGE=1
--
- noinst_LTLIBRARIES = libkmod/libkmod-util.la
- libkmod_libkmod_util_la_SOURCES = libkmod/libkmod-hash.c \
- libkmod/libkmod-hash.h \
-@@ -65,7 +61,7 @@ EXTRA_DIST += libkmod/libkmod.sym
- EXTRA_DIST += libkmod/COPYING libkmod/README
-
- libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \
-- -version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) \
-+ -version-number 2:1 \
- -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
- libkmod_libkmod_la_DEPENDENCIES = libkmod/libkmod-util.la \
- ${top_srcdir}/libkmod/libkmod.sym