diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-10-03 00:29:18 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-10-03 00:40:11 -0300 |
commit | 0db718edcfca1bdaf1369d3cf3773b52fcea1406 (patch) | |
tree | 53faf1dab5e06c03e7107cc6c705823e80f020a4 | |
parent | 74d1df6682e9dab799e6da8ad032f61b15be57d2 (diff) | |
download | kmod-0db718edcfca1bdaf1369d3cf3773b52fcea1406.tar.gz |
Move hash implementation to shared directory
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | libkmod/docs/Makefile.am | 1 | ||||
-rw-r--r-- | libkmod/libkmod-internal.h | 3 | ||||
-rw-r--r-- | libkmod/libkmod.c | 1 | ||||
-rw-r--r-- | shared/hash.c (renamed from libkmod/libkmod-hash.c) | 10 | ||||
-rw-r--r-- | shared/hash.h (renamed from libkmod/libkmod-hash.h) | 0 | ||||
-rw-r--r-- | testsuite/test-hash.c | 3 | ||||
-rw-r--r-- | tools/depmod.c | 2 |
8 files changed, 10 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am index 7f65e31..4971be4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,10 +48,10 @@ libkmod_libkmod_util_la_SOURCES = \ shared/missing.h \ shared/array.c \ shared/array.h \ + shared/hash.c \ + shared/hash.h \ shared/util.c \ shared/util.h \ - libkmod/libkmod-hash.c \ - libkmod/libkmod-hash.h \ libkmod/libkmod-util.c \ libkmod/libkmod-util.h diff --git a/libkmod/docs/Makefile.am b/libkmod/docs/Makefile.am index 1fd6b90..cd3bb16 100644 --- a/libkmod/docs/Makefile.am +++ b/libkmod/docs/Makefile.am @@ -22,7 +22,6 @@ CFILE_GLOB = $(top_srcdir)/libkmod/libkmod.c $(top_srcdir)/libkmod/libkmod-modul IGNORE_HFILES = libkmod-internal.h \ libkmod-util.h \ - libkmod-hash.h \ libkmod-index.h content_files = version.xml diff --git a/libkmod/libkmod-internal.h b/libkmod/libkmod-internal.h index 79f1a13..83a5bc2 100644 --- a/libkmod/libkmod-internal.h +++ b/libkmod/libkmod-internal.h @@ -146,9 +146,6 @@ void kmod_module_set_visited(struct kmod_module *mod, bool visited) __attribute_ void kmod_module_set_builtin(struct kmod_module *mod, bool builtin) __attribute__((nonnull((1)))); void kmod_module_set_required(struct kmod_module *mod, bool required) __attribute__((nonnull(1))); -/* libkmod-hash.c */ - -#include "libkmod-hash.h" /* libkmod-file.c */ struct kmod_file *kmod_file_open(const struct kmod_ctx *ctx, const char *filename) _must_check_ __attribute__((nonnull(1,2))); diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index 89d70c3..3dc5a2b 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -32,6 +32,7 @@ #include <sys/utsname.h> #include <sys/stat.h> +#include <shared/hash.h> #include <shared/util.h> #include "libkmod.h" diff --git a/libkmod/libkmod-hash.c b/shared/hash.c index 9b4d1f1..d2f5a78 100644 --- a/libkmod/libkmod-hash.c +++ b/shared/hash.c @@ -18,16 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <shared/util.h> - -#include "libkmod.h" -#include "libkmod-hash.h" - -#include "libkmod-util.h" +#include <inttypes.h> #include <stdlib.h> #include <string.h> #include <errno.h> +#include <shared/hash.h> +#include <shared/util.h> + struct hash_entry { const char *key; const void *value; diff --git a/libkmod/libkmod-hash.h b/shared/hash.h index ca0af05..ca0af05 100644 --- a/libkmod/libkmod-hash.h +++ b/shared/hash.h diff --git a/testsuite/test-hash.c b/testsuite/test-hash.c index 110c4d1..61260d9 100644 --- a/testsuite/test-hash.c +++ b/testsuite/test-hash.c @@ -23,7 +23,8 @@ #include <errno.h> #include <unistd.h> -#include <libkmod-hash.h> +#include <shared/hash.h> + #include "testsuite.h" static int freecount; diff --git a/tools/depmod.c b/tools/depmod.c index e1e08f6..69c3f3f 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -17,10 +17,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "libkmod.h" -#include "libkmod-hash.h" #include "libkmod-util.h" #include <shared/array.h> +#include <shared/hash.h> #include <shared/macro.h> #include <shared/util.h> |