summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McCarty <patrick.mccarty@linux.intel.com>2013-11-21 11:45:36 -0800
committerPatrick McCarty <patrick.mccarty@linux.intel.com>2013-11-21 11:45:36 -0800
commit68049899bb9a610fc8abda174dbc2462b3a2acd9 (patch)
treee6b8f15a4cdda9e1662c9f82cbb4faf816b7f996
parent0221a881b50d2db43965dc61f9817148fad57575 (diff)
downloadkmod-upstream-pristine-tar.tar.gz
kmod-upstream-pristine-tar.tar.bz2
kmod-upstream-pristine-tar.zip
Imported Upstream version 15upstream/15upstream-pristine-tar
-rw-r--r--Makefile.am42
-rw-r--r--Makefile.in904
-rw-r--r--NEWS57
-rw-r--r--README57
-rw-r--r--TODO76
-rw-r--r--aclocal.m4381
-rwxr-xr-xbuild-aux/compile2
-rwxr-xr-xbuild-aux/config.guess167
-rwxr-xr-xbuild-aux/config.sub61
-rwxr-xr-xbuild-aux/depcomp410
-rwxr-xr-xbuild-aux/missing405
-rwxr-xr-xbuild-aux/test-driver127
-rw-r--r--config.h.in15
-rwxr-xr-xconfigure537
-rw-r--r--configure.ac25
-rw-r--r--libkmod/README2
-rw-r--r--libkmod/docs/Makefile.am2
-rw-r--r--libkmod/docs/Makefile.in183
-rw-r--r--libkmod/docs/gtk-doc.make70
-rw-r--r--libkmod/docs/html/api-index-full.html370
-rw-r--r--libkmod/docs/html/ch01.html47
-rw-r--r--libkmod/docs/html/home.pngbin0 -> 654 bytes
-rw-r--r--libkmod/docs/html/index.html48
-rw-r--r--libkmod/docs/html/index.sgml97
-rw-r--r--libkmod/docs/html/left.pngbin0 -> 459 bytes
-rw-r--r--libkmod/docs/html/libkmod-libkmod-config.html338
-rw-r--r--libkmod/docs/html/libkmod-libkmod-list.html173
-rw-r--r--libkmod/docs/html/libkmod-libkmod-loaded.html236
-rw-r--r--libkmod/docs/html/libkmod-libkmod-module.html1353
-rw-r--r--libkmod/docs/html/libkmod-libkmod.html436
-rw-r--r--libkmod/docs/html/libkmod.devhelp293
-rw-r--r--libkmod/docs/html/right.pngbin0 -> 472 bytes
-rw-r--r--libkmod/docs/html/style.css266
-rw-r--r--libkmod/docs/html/up.pngbin0 -> 406 bytes
-rw-r--r--libkmod/docs/libkmod-overrides.txt0
-rw-r--r--libkmod/docs/version.xml1
-rw-r--r--libkmod/libkmod-array.c2
-rw-r--r--libkmod/libkmod-config.c8
-rw-r--r--libkmod/libkmod-elf.c14
-rw-r--r--libkmod/libkmod-file.c20
-rw-r--r--libkmod/libkmod-hash.c2
-rw-r--r--libkmod/libkmod-index.c18
-rw-r--r--libkmod/libkmod-index.h2
-rw-r--r--libkmod/libkmod-internal.h (renamed from libkmod/libkmod-private.h)25
-rw-r--r--libkmod/libkmod-list.c4
-rw-r--r--libkmod/libkmod-module.c165
-rw-r--r--libkmod/libkmod-signature.c141
-rw-r--r--libkmod/libkmod-util.c77
-rw-r--r--libkmod/libkmod-util.h3
-rw-r--r--libkmod/libkmod.c19
-rw-r--r--libkmod/libkmod.h2
-rw-r--r--libkmod/macro.h38
-rw-r--r--libkmod/missing.h34
-rw-r--r--m4/gtk-doc.m46
-rw-r--r--man/Makefile.am6
-rw-r--r--man/Makefile.in112
-rw-r--r--man/depmod.88
-rw-r--r--man/depmod.d.57
-rw-r--r--man/insmod.811
-rw-r--r--man/lsmod.88
-rw-r--r--man/modinfo.89
-rw-r--r--man/modprobe.89
-rw-r--r--man/modprobe.d.511
-rw-r--r--man/modprobe.d.xml2
-rw-r--r--man/modules.dep.57
-rw-r--r--man/rmmod.811
-rw-r--r--shell-completion/bash/kmod103
-rw-r--r--testsuite/delete_module.c2
-rw-r--r--testsuite/init_module.c71
-rw-r--r--testsuite/mkdir.c70
-rw-r--r--testsuite/mkdir.h24
-rw-r--r--testsuite/path.c2
-rw-r--r--testsuite/rootfs-pristine/test-modinfo/correct.txt24
-rw-r--r--testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha1.kobin0 -> 729451 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha256.kobin0 -> 729451 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/correct-psmouse.txt0
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/etc/modprobe.d/bogus.conf1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.kobin0 -> 95649 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias3
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias.binbin0 -> 101 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.builtin.bin0
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep.binbin0 -> 72 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.devname1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.softdep2
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols.binbin0 -> 12 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/alias-to-none/proc/modules0
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/correct.txt1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.kobin0 -> 95649 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias3
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias.binbin0 -> 101 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.builtin.bin0
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep.binbin0 -> 72 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.devname1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.softdep2
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols.binbin0 -> 12 bytes
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/cmdline1
-rw-r--r--testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/modules0
-rw-r--r--testsuite/test-alias.c2
-rw-r--r--testsuite/test-blacklist.c4
-rw-r--r--testsuite/test-dependencies.c2
-rw-r--r--testsuite/test-depmod.c2
-rw-r--r--testsuite/test-init.c2
-rw-r--r--testsuite/test-loaded.c2
-rw-r--r--testsuite/test-modinfo.c5
-rw-r--r--testsuite/test-modprobe.c51
-rw-r--r--testsuite/test-new-module.c2
-rw-r--r--testsuite/test-testsuite.c2
-rw-r--r--testsuite/testsuite.c6
-rw-r--r--testsuite/testsuite.h2
-rw-r--r--testsuite/uname.c2
-rw-r--r--tools/depmod.c42
-rw-r--r--tools/insmod.c2
-rw-r--r--tools/kmod.c3
-rw-r--r--tools/kmod.h3
-rw-r--r--tools/log.c3
-rw-r--r--tools/log.h4
-rw-r--r--tools/lsmod.c2
-rw-r--r--tools/modinfo.c2
-rw-r--r--tools/modprobe.c13
-rw-r--r--tools/rmmod.c10
-rw-r--r--tools/static-nodes.c276
125 files changed, 6783 insertions, 1738 deletions
diff --git a/Makefile.am b/Makefile.am
index 995f2de..c28d2b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,7 +37,7 @@ SED_PROCESS = \
$(SED_PROCESS)
LIBKMOD_CURRENT=4
-LIBKMOD_REVISION=2
+LIBKMOD_REVISION=5
LIBKMOD_AGE=2
noinst_LTLIBRARIES = libkmod/libkmod-util.la
@@ -53,8 +53,9 @@ lib_LTLIBRARIES = libkmod/libkmod.la
libkmod_libkmod_la_SOURCES =\
libkmod/libkmod.h \
- libkmod/libkmod-private.h \
+ libkmod/libkmod-internal.h \
libkmod/macro.h \
+ libkmod/missing.h \
libkmod/libkmod.c \
libkmod/libkmod-list.c \
libkmod/libkmod-config.c \
@@ -62,7 +63,8 @@ libkmod_libkmod_la_SOURCES =\
libkmod/libkmod-index.h \
libkmod/libkmod-module.c \
libkmod/libkmod-file.c \
- libkmod/libkmod-elf.c
+ libkmod/libkmod-elf.c \
+ libkmod/libkmod-signature.c
EXTRA_DIST += libkmod/libkmod.sym
EXTRA_DIST += libkmod/README libkmod/COPYING testsuite/COPYING COPYING
@@ -75,18 +77,22 @@ libkmod_libkmod_la_DEPENDENCIES = libkmod/libkmod-util.la \
libkmod_libkmod_la_LIBADD = libkmod/libkmod-util.la \
${liblzma_LIBS} ${zlib_LIBS}
-noinst_LTLIBRARIES += libkmod/libkmod-private.la
-libkmod_libkmod_private_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
-libkmod_libkmod_private_la_LDFLAGS = $(AM_LDFLAGS) \
+noinst_LTLIBRARIES += libkmod/libkmod-internal.la
+libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
+libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
-libkmod_libkmod_private_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
-libkmod_libkmod_private_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
+libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
+libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libkmod/libkmod.pc
EXTRA_DIST += libkmod/libkmod.pc.in
CLEANFILES += libkmod/libkmod.pc
+bashcompletiondir=@bashcompletiondir@
+dist_bashcompletion_DATA = \
+ shell-completion/bash/kmod
+
install-exec-hook:
if test "$(libdir)" != "$(rootlibdir)"; then \
$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
@@ -108,16 +114,12 @@ noinst_SCRIPTS = tools/insmod tools/rmmod tools/lsmod \
tools_kmod_SOURCES = tools/kmod.c tools/kmod.h tools/lsmod.c \
tools/rmmod.c tools/insmod.c \
tools/modinfo.c tools/modprobe.c \
- tools/depmod.c tools/log.h tools/log.c
+ tools/depmod.c tools/log.h tools/log.c \
+ tools/static-nodes.c
tools_kmod_LDADD = libkmod/libkmod-util.la \
- libkmod/libkmod.la
-
-noinst_PROGRAMS = tools/kmod-nolib
-tools_kmod_nolib_SOURCES = $(tools_kmod_SOURCES)
-tools_kmod_nolib_LDADD = libkmod/libkmod-util.la \
- libkmod/libkmod-private.la
+ libkmod/libkmod-internal.la
-${noinst_SCRIPTS}: tools/kmod-nolib
+${noinst_SCRIPTS}: tools/kmod
$(AM_V_GEN) ($(RM) $@; \
$(LN_S) $(notdir $<) $@)
endif
@@ -156,14 +158,13 @@ testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_init_module_la_SOURCES = testsuite/init_module.c \
- testsuite/mkdir.c testsuite/mkdir.h \
testsuite/stripped-module.h
-testsuite_init_module_la_LIBADD = libkmod/libkmod-private.la
+testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la
TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \
-DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \
-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
-TESTSUITE_LDADD = testsuite/libtestsuite.la libkmod/libkmod-private.la \
+TESTSUITE_LDADD = testsuite/libtestsuite.la libkmod/libkmod-internal.la \
libkmod/libkmod-util.la
check_LTLIBRARIES += testsuite/libtestsuite.la
@@ -210,7 +211,8 @@ testsuite-distclean:
DISTCLEAN_LOCAL_HOOKS += testsuite-distclean
EXTRA_DIST += testsuite/rootfs-pristine
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --sysconfdir=/etc --with-zlib
+DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --sysconfdir=/etc --with-zlib \
+ --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir)
distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
diff --git a/Makefile.in b/Makefile.in
index 6241cf1..d9d87a5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -19,23 +19,51 @@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -56,22 +84,22 @@ build_triplet = @build@
host_triplet = @host@
@BUILD_MANPAGES_TRUE@am__append_1 = man
@BUILD_TOOLS_TRUE@bin_PROGRAMS = tools/kmod$(EXEEXT)
-@BUILD_TOOLS_TRUE@noinst_PROGRAMS = tools/kmod-nolib$(EXEEXT)
check_PROGRAMS = $(am__EXEEXT_1)
TESTS = $(am__EXEEXT_1)
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(top_srcdir)/build-aux/compile \
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.h.in $(top_srcdir)/build-aux/depcomp \
+ $(dist_bashcompletion_DATA) $(include_HEADERS) \
+ $(top_srcdir)/build-aux/test-driver COPYING NEWS README TODO \
+ build-aux/compile build-aux/config.guess build-aux/config.sub \
+ build-aux/depcomp build-aux/install-sh build-aux/missing \
+ build-aux/ltmain.sh $(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.sub \
- $(top_srcdir)/build-aux/depcomp \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/ltmain.sh \
- $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \
- COPYING NEWS TODO build-aux/compile build-aux/config.guess \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/ltmain.sh build-aux/missing
+ $(top_srcdir)/build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -114,7 +142,8 @@ am__uninstall_files_from_dir = { \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"
+ "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = libkmod/libkmod-util.la $(am__DEPENDENCIES_1) \
@@ -123,17 +152,17 @@ am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 = libkmod/libkmod.lo libkmod/libkmod-list.lo \
libkmod/libkmod-config.lo libkmod/libkmod-index.lo \
libkmod/libkmod-module.lo libkmod/libkmod-file.lo \
- libkmod/libkmod-elf.lo
-am_libkmod_libkmod_private_la_OBJECTS = $(am__objects_1)
-libkmod_libkmod_private_la_OBJECTS = \
- $(am_libkmod_libkmod_private_la_OBJECTS)
+ libkmod/libkmod-elf.lo libkmod/libkmod-signature.lo
+am_libkmod_libkmod_internal_la_OBJECTS = $(am__objects_1)
+libkmod_libkmod_internal_la_OBJECTS = \
+ $(am_libkmod_libkmod_internal_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-libkmod_libkmod_private_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+libkmod_libkmod_internal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libkmod_libkmod_private_la_LDFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS) $(libkmod_libkmod_internal_la_LDFLAGS) \
$(LDFLAGS) -o $@
libkmod_libkmod_util_la_LIBADD =
am_libkmod_libkmod_util_la_OBJECTS = libkmod/libkmod-hash.lo \
@@ -143,7 +172,8 @@ libkmod_libkmod_util_la_OBJECTS = \
am_libkmod_libkmod_la_OBJECTS = libkmod/libkmod.lo \
libkmod/libkmod-list.lo libkmod/libkmod-config.lo \
libkmod/libkmod-index.lo libkmod/libkmod-module.lo \
- libkmod/libkmod-file.lo libkmod/libkmod-elf.lo
+ libkmod/libkmod-file.lo libkmod/libkmod-elf.lo \
+ libkmod/libkmod-signature.lo
libkmod_libkmod_la_OBJECTS = $(am_libkmod_libkmod_la_OBJECTS)
libkmod_libkmod_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -156,9 +186,8 @@ testsuite_delete_module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(testsuite_delete_module_la_LDFLAGS) \
$(LDFLAGS) -o $@
-testsuite_init_module_la_DEPENDENCIES = libkmod/libkmod-private.la
-am_testsuite_init_module_la_OBJECTS = testsuite/init_module.lo \
- testsuite/mkdir.lo
+testsuite_init_module_la_DEPENDENCIES = libkmod/libkmod-internal.la
+am_testsuite_init_module_la_OBJECTS = testsuite/init_module.lo
testsuite_init_module_la_OBJECTS = \
$(am_testsuite_init_module_la_OBJECTS)
testsuite_init_module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -192,7 +221,7 @@ am__EXEEXT_1 = testsuite/test-init$(EXEEXT) \
testsuite/test-blacklist$(EXEEXT) \
testsuite/test-dependencies$(EXEEXT) \
testsuite/test-depmod$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+PROGRAMS = $(bin_PROGRAMS)
testsuite_test_alias_SOURCES = testsuite/test-alias.c
testsuite_test_alias_OBJECTS = \
testsuite/testsuite_test_alias-test-alias.$(OBJEXT)
@@ -235,30 +264,17 @@ testsuite_test_testsuite_DEPENDENCIES = testsuite/libtestsuite.la \
libkmod/libkmod-util.la
am__tools_kmod_SOURCES_DIST = tools/kmod.c tools/kmod.h tools/lsmod.c \
tools/rmmod.c tools/insmod.c tools/modinfo.c tools/modprobe.c \
- tools/depmod.c tools/log.h tools/log.c
+ tools/depmod.c tools/log.h tools/log.c tools/static-nodes.c
@BUILD_TOOLS_TRUE@am_tools_kmod_OBJECTS = tools/kmod.$(OBJEXT) \
@BUILD_TOOLS_TRUE@ tools/lsmod.$(OBJEXT) tools/rmmod.$(OBJEXT) \
@BUILD_TOOLS_TRUE@ tools/insmod.$(OBJEXT) \
@BUILD_TOOLS_TRUE@ tools/modinfo.$(OBJEXT) \
@BUILD_TOOLS_TRUE@ tools/modprobe.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/depmod.$(OBJEXT) tools/log.$(OBJEXT)
+@BUILD_TOOLS_TRUE@ tools/depmod.$(OBJEXT) tools/log.$(OBJEXT) \
+@BUILD_TOOLS_TRUE@ tools/static-nodes.$(OBJEXT)
tools_kmod_OBJECTS = $(am_tools_kmod_OBJECTS)
@BUILD_TOOLS_TRUE@tools_kmod_DEPENDENCIES = libkmod/libkmod-util.la \
-@BUILD_TOOLS_TRUE@ libkmod/libkmod.la
-am__tools_kmod_nolib_SOURCES_DIST = tools/kmod.c tools/kmod.h \
- tools/lsmod.c tools/rmmod.c tools/insmod.c tools/modinfo.c \
- tools/modprobe.c tools/depmod.c tools/log.h tools/log.c
-@BUILD_TOOLS_TRUE@am__objects_2 = tools/kmod.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/lsmod.$(OBJEXT) tools/rmmod.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/insmod.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/modinfo.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/modprobe.$(OBJEXT) \
-@BUILD_TOOLS_TRUE@ tools/depmod.$(OBJEXT) tools/log.$(OBJEXT)
-@BUILD_TOOLS_TRUE@am_tools_kmod_nolib_OBJECTS = $(am__objects_2)
-tools_kmod_nolib_OBJECTS = $(am_tools_kmod_nolib_OBJECTS)
-@BUILD_TOOLS_TRUE@tools_kmod_nolib_DEPENDENCIES = \
-@BUILD_TOOLS_TRUE@ libkmod/libkmod-util.la \
-@BUILD_TOOLS_TRUE@ libkmod/libkmod-private.la
+@BUILD_TOOLS_TRUE@ libkmod/libkmod-internal.la
SCRIPTS = $(noinst_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -294,7 +310,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(libkmod_libkmod_private_la_SOURCES) \
+SOURCES = $(libkmod_libkmod_internal_la_SOURCES) \
$(libkmod_libkmod_util_la_SOURCES) \
$(libkmod_libkmod_la_SOURCES) testsuite/delete_module.c \
$(testsuite_init_module_la_SOURCES) \
@@ -304,9 +320,8 @@ SOURCES = $(libkmod_libkmod_private_la_SOURCES) \
testsuite/test-depmod.c testsuite/test-init.c \
testsuite/test-loaded.c testsuite/test-modinfo.c \
testsuite/test-modprobe.c testsuite/test-new-module.c \
- testsuite/test-testsuite.c $(tools_kmod_SOURCES) \
- $(tools_kmod_nolib_SOURCES)
-DIST_SOURCES = $(libkmod_libkmod_private_la_SOURCES) \
+ testsuite/test-testsuite.c $(tools_kmod_SOURCES)
+DIST_SOURCES = $(libkmod_libkmod_internal_la_SOURCES) \
$(libkmod_libkmod_util_la_SOURCES) \
$(libkmod_libkmod_la_SOURCES) testsuite/delete_module.c \
$(testsuite_init_module_la_SOURCES) \
@@ -316,27 +331,48 @@ DIST_SOURCES = $(libkmod_libkmod_private_la_SOURCES) \
testsuite/test-depmod.c testsuite/test-init.c \
testsuite/test-loaded.c testsuite/test-modinfo.c \
testsuite/test-modprobe.c testsuite/test-new-module.c \
- testsuite/test-testsuite.c $(am__tools_kmod_SOURCES_DIST) \
- $(am__tools_kmod_nolib_SOURCES_DIST)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+ testsuite/test-testsuite.c $(am__tools_kmod_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-DATA = $(pkgconfig_DATA)
+DATA = $(dist_bashcompletion_DATA) $(pkgconfig_DATA)
HEADERS = $(include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- cscope distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope check recheck distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
@@ -362,6 +398,160 @@ am__tty_colors = { \
std=''; \
fi; \
}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
DIST_SUBDIRS = . libkmod/docs man
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
@@ -491,6 +681,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+bashcompletiondir = @bashcompletiondir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -567,10 +758,10 @@ SED_PROCESS = \
< $< > $@ || rm $@
LIBKMOD_CURRENT = 4
-LIBKMOD_REVISION = 2
+LIBKMOD_REVISION = 5
LIBKMOD_AGE = 2
noinst_LTLIBRARIES = libkmod/libkmod-util.la \
- libkmod/libkmod-private.la
+ libkmod/libkmod-internal.la
libkmod_libkmod_util_la_SOURCES = libkmod/libkmod-hash.c \
libkmod/libkmod-hash.h \
libkmod/libkmod-array.c \
@@ -582,8 +773,9 @@ include_HEADERS = libkmod/libkmod.h
lib_LTLIBRARIES = libkmod/libkmod.la
libkmod_libkmod_la_SOURCES = \
libkmod/libkmod.h \
- libkmod/libkmod-private.h \
+ libkmod/libkmod-internal.h \
libkmod/macro.h \
+ libkmod/missing.h \
libkmod/libkmod.c \
libkmod/libkmod-list.c \
libkmod/libkmod-config.c \
@@ -591,7 +783,8 @@ libkmod_libkmod_la_SOURCES = \
libkmod/libkmod-index.h \
libkmod/libkmod-module.c \
libkmod/libkmod-file.c \
- libkmod/libkmod-elf.c
+ libkmod/libkmod-elf.c \
+ libkmod/libkmod-signature.c
libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \
-version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) \
@@ -603,28 +796,28 @@ libkmod_libkmod_la_DEPENDENCIES = libkmod/libkmod-util.la \
libkmod_libkmod_la_LIBADD = libkmod/libkmod-util.la \
${liblzma_LIBS} ${zlib_LIBS}
-libkmod_libkmod_private_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
-libkmod_libkmod_private_la_LDFLAGS = $(AM_LDFLAGS) \
+libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
+libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
-libkmod_libkmod_private_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
-libkmod_libkmod_private_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
+libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
+libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libkmod/libkmod.pc
+dist_bashcompletion_DATA = \
+ shell-completion/bash/kmod
+
@BUILD_TOOLS_TRUE@noinst_SCRIPTS = tools/insmod tools/rmmod tools/lsmod \
@BUILD_TOOLS_TRUE@ tools/modprobe tools/modinfo tools/depmod
@BUILD_TOOLS_TRUE@tools_kmod_SOURCES = tools/kmod.c tools/kmod.h tools/lsmod.c \
@BUILD_TOOLS_TRUE@ tools/rmmod.c tools/insmod.c \
@BUILD_TOOLS_TRUE@ tools/modinfo.c tools/modprobe.c \
-@BUILD_TOOLS_TRUE@ tools/depmod.c tools/log.h tools/log.c
+@BUILD_TOOLS_TRUE@ tools/depmod.c tools/log.h tools/log.c \
+@BUILD_TOOLS_TRUE@ tools/static-nodes.c
@BUILD_TOOLS_TRUE@tools_kmod_LDADD = libkmod/libkmod-util.la \
-@BUILD_TOOLS_TRUE@ libkmod/libkmod.la
-
-@BUILD_TOOLS_TRUE@tools_kmod_nolib_SOURCES = $(tools_kmod_SOURCES)
-@BUILD_TOOLS_TRUE@tools_kmod_nolib_LDADD = libkmod/libkmod-util.la \
-@BUILD_TOOLS_TRUE@ libkmod/libkmod-private.la
+@BUILD_TOOLS_TRUE@ libkmod/libkmod-internal.la
# ------------------------------------------------------------------------------
@@ -651,15 +844,14 @@ testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_init_module_la_SOURCES = testsuite/init_module.c \
- testsuite/mkdir.c testsuite/mkdir.h \
testsuite/stripped-module.h
-testsuite_init_module_la_LIBADD = libkmod/libkmod-private.la
+testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la
TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \
-DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \
-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
-TESTSUITE_LDADD = testsuite/libtestsuite.la libkmod/libkmod-private.la \
+TESTSUITE_LDADD = testsuite/libtestsuite.la libkmod/libkmod-internal.la \
libkmod/libkmod-util.la
testsuite_libtestsuite_la_SOURCES = testsuite/testsuite.c \
@@ -695,12 +887,14 @@ testsuite_test_dependencies_LDADD = $(TESTSUITE_LDADD)
testsuite_test_dependencies_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD)
testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --sysconfdir=/etc --with-zlib
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --sysconfdir=/etc --with-zlib \
+ --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir)
+
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -737,8 +931,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -761,6 +955,7 @@ clean-checkLTLIBRARIES:
echo rm -f $${locs}; \
rm -f $${locs}; \
}
+
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
@@ -826,16 +1021,21 @@ libkmod/libkmod-file.lo: libkmod/$(am__dirstamp) \
libkmod/$(DEPDIR)/$(am__dirstamp)
libkmod/libkmod-elf.lo: libkmod/$(am__dirstamp) \
libkmod/$(DEPDIR)/$(am__dirstamp)
-libkmod/libkmod-private.la: $(libkmod_libkmod_private_la_OBJECTS) $(libkmod_libkmod_private_la_DEPENDENCIES) $(EXTRA_libkmod_libkmod_private_la_DEPENDENCIES) libkmod/$(am__dirstamp)
- $(AM_V_CCLD)$(libkmod_libkmod_private_la_LINK) $(libkmod_libkmod_private_la_OBJECTS) $(libkmod_libkmod_private_la_LIBADD) $(LIBS)
+libkmod/libkmod-signature.lo: libkmod/$(am__dirstamp) \
+ libkmod/$(DEPDIR)/$(am__dirstamp)
+
+libkmod/libkmod-internal.la: $(libkmod_libkmod_internal_la_OBJECTS) $(libkmod_libkmod_internal_la_DEPENDENCIES) $(EXTRA_libkmod_libkmod_internal_la_DEPENDENCIES) libkmod/$(am__dirstamp)
+ $(AM_V_CCLD)$(libkmod_libkmod_internal_la_LINK) $(libkmod_libkmod_internal_la_OBJECTS) $(libkmod_libkmod_internal_la_LIBADD) $(LIBS)
libkmod/libkmod-hash.lo: libkmod/$(am__dirstamp) \
libkmod/$(DEPDIR)/$(am__dirstamp)
libkmod/libkmod-array.lo: libkmod/$(am__dirstamp) \
libkmod/$(DEPDIR)/$(am__dirstamp)
libkmod/libkmod-util.lo: libkmod/$(am__dirstamp) \
libkmod/$(DEPDIR)/$(am__dirstamp)
+
libkmod/libkmod-util.la: $(libkmod_libkmod_util_la_OBJECTS) $(libkmod_libkmod_util_la_DEPENDENCIES) $(EXTRA_libkmod_libkmod_util_la_DEPENDENCIES) libkmod/$(am__dirstamp)
$(AM_V_CCLD)$(LINK) $(libkmod_libkmod_util_la_OBJECTS) $(libkmod_libkmod_util_la_LIBADD) $(LIBS)
+
libkmod/libkmod.la: $(libkmod_libkmod_la_OBJECTS) $(libkmod_libkmod_la_DEPENDENCIES) $(EXTRA_libkmod_libkmod_la_DEPENDENCIES) libkmod/$(am__dirstamp)
$(AM_V_CCLD)$(libkmod_libkmod_la_LINK) -rpath $(libdir) $(libkmod_libkmod_la_OBJECTS) $(libkmod_libkmod_la_LIBADD) $(LIBS)
testsuite/$(am__dirstamp):
@@ -846,24 +1046,27 @@ testsuite/$(DEPDIR)/$(am__dirstamp):
@: > testsuite/$(DEPDIR)/$(am__dirstamp)
testsuite/delete_module.lo: testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/delete_module.la: $(testsuite_delete_module_la_OBJECTS) $(testsuite_delete_module_la_DEPENDENCIES) $(EXTRA_testsuite_delete_module_la_DEPENDENCIES) testsuite/$(am__dirstamp)
$(AM_V_CCLD)$(testsuite_delete_module_la_LINK) $(testsuite_delete_module_la_OBJECTS) $(testsuite_delete_module_la_LIBADD) $(LIBS)
testsuite/init_module.lo: testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
-testsuite/mkdir.lo: testsuite/$(am__dirstamp) \
- testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/init_module.la: $(testsuite_init_module_la_OBJECTS) $(testsuite_init_module_la_DEPENDENCIES) $(EXTRA_testsuite_init_module_la_DEPENDENCIES) testsuite/$(am__dirstamp)
$(AM_V_CCLD)$(testsuite_init_module_la_LINK) $(testsuite_init_module_la_OBJECTS) $(testsuite_init_module_la_LIBADD) $(LIBS)
testsuite/testsuite_libtestsuite_la-testsuite.lo: \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/libtestsuite.la: $(testsuite_libtestsuite_la_OBJECTS) $(testsuite_libtestsuite_la_DEPENDENCIES) $(EXTRA_testsuite_libtestsuite_la_DEPENDENCIES) testsuite/$(am__dirstamp)
$(AM_V_CCLD)$(LINK) $(testsuite_libtestsuite_la_OBJECTS) $(testsuite_libtestsuite_la_LIBADD) $(LIBS)
testsuite/path.lo: testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/path.la: $(testsuite_path_la_OBJECTS) $(testsuite_path_la_DEPENDENCIES) $(EXTRA_testsuite_path_la_DEPENDENCIES) testsuite/$(am__dirstamp)
$(AM_V_CCLD)$(testsuite_path_la_LINK) $(testsuite_path_la_OBJECTS) $(testsuite_path_la_LIBADD) $(LIBS)
testsuite/uname.lo: testsuite/$(am__dirstamp) \
testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/uname.la: $(testsuite_uname_la_OBJECTS) $(testsuite_uname_la_DEPENDENCIES) $(EXTRA_testsuite_uname_la_DEPENDENCIES) testsuite/$(am__dirstamp)
$(AM_V_CCLD)$(testsuite_uname_la_LINK) $(testsuite_uname_la_OBJECTS) $(testsuite_uname_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@@ -875,10 +1078,12 @@ install-binPROGRAMS: $(bin_PROGRAMS)
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -899,7 +1104,8 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -921,62 +1127,63 @@ clean-checkPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
testsuite/testsuite_test_alias-test-alias.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-alias$(EXEEXT): $(testsuite_test_alias_OBJECTS) $(testsuite_test_alias_DEPENDENCIES) $(EXTRA_testsuite_test_alias_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-alias$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_alias_OBJECTS) $(testsuite_test_alias_LDADD) $(LIBS)
testsuite/testsuite_test_blacklist-test-blacklist.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-blacklist$(EXEEXT): $(testsuite_test_blacklist_OBJECTS) $(testsuite_test_blacklist_DEPENDENCIES) $(EXTRA_testsuite_test_blacklist_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-blacklist$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_blacklist_OBJECTS) $(testsuite_test_blacklist_LDADD) $(LIBS)
testsuite/testsuite_test_dependencies-test-dependencies.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-dependencies$(EXEEXT): $(testsuite_test_dependencies_OBJECTS) $(testsuite_test_dependencies_DEPENDENCIES) $(EXTRA_testsuite_test_dependencies_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-dependencies$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_dependencies_OBJECTS) $(testsuite_test_dependencies_LDADD) $(LIBS)
testsuite/testsuite_test_depmod-test-depmod.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-depmod$(EXEEXT): $(testsuite_test_depmod_OBJECTS) $(testsuite_test_depmod_DEPENDENCIES) $(EXTRA_testsuite_test_depmod_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-depmod$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_depmod_OBJECTS) $(testsuite_test_depmod_LDADD) $(LIBS)
testsuite/testsuite_test_init-test-init.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-init$(EXEEXT): $(testsuite_test_init_OBJECTS) $(testsuite_test_init_DEPENDENCIES) $(EXTRA_testsuite_test_init_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-init$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_init_OBJECTS) $(testsuite_test_init_LDADD) $(LIBS)
testsuite/testsuite_test_loaded-test-loaded.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-loaded$(EXEEXT): $(testsuite_test_loaded_OBJECTS) $(testsuite_test_loaded_DEPENDENCIES) $(EXTRA_testsuite_test_loaded_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-loaded$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_loaded_OBJECTS) $(testsuite_test_loaded_LDADD) $(LIBS)
testsuite/testsuite_test_modinfo-test-modinfo.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-modinfo$(EXEEXT): $(testsuite_test_modinfo_OBJECTS) $(testsuite_test_modinfo_DEPENDENCIES) $(EXTRA_testsuite_test_modinfo_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-modinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_modinfo_OBJECTS) $(testsuite_test_modinfo_LDADD) $(LIBS)
testsuite/testsuite_test_modprobe-test-modprobe.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-modprobe$(EXEEXT): $(testsuite_test_modprobe_OBJECTS) $(testsuite_test_modprobe_DEPENDENCIES) $(EXTRA_testsuite_test_modprobe_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-modprobe$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_modprobe_OBJECTS) $(testsuite_test_modprobe_LDADD) $(LIBS)
testsuite/testsuite_test_new_module-test-new-module.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-new-module$(EXEEXT): $(testsuite_test_new_module_OBJECTS) $(testsuite_test_new_module_DEPENDENCIES) $(EXTRA_testsuite_test_new_module_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-new-module$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_new_module_OBJECTS) $(testsuite_test_new_module_LDADD) $(LIBS)
testsuite/testsuite_test_testsuite-test-testsuite.$(OBJEXT): \
testsuite/$(am__dirstamp) testsuite/$(DEPDIR)/$(am__dirstamp)
+
testsuite/test-testsuite$(EXEEXT): $(testsuite_test_testsuite_OBJECTS) $(testsuite_test_testsuite_DEPENDENCIES) $(EXTRA_testsuite_test_testsuite_DEPENDENCIES) testsuite/$(am__dirstamp)
@rm -f testsuite/test-testsuite$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(testsuite_test_testsuite_OBJECTS) $(testsuite_test_testsuite_LDADD) $(LIBS)
@@ -1002,12 +1209,12 @@ tools/depmod.$(OBJEXT): tools/$(am__dirstamp) \
tools/$(DEPDIR)/$(am__dirstamp)
tools/log.$(OBJEXT): tools/$(am__dirstamp) \
tools/$(DEPDIR)/$(am__dirstamp)
+tools/static-nodes.$(OBJEXT): tools/$(am__dirstamp) \
+ tools/$(DEPDIR)/$(am__dirstamp)
+
tools/kmod$(EXEEXT): $(tools_kmod_OBJECTS) $(tools_kmod_DEPENDENCIES) $(EXTRA_tools_kmod_DEPENDENCIES) tools/$(am__dirstamp)
@rm -f tools/kmod$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tools_kmod_OBJECTS) $(tools_kmod_LDADD) $(LIBS)
-tools/kmod-nolib$(EXEEXT): $(tools_kmod_nolib_OBJECTS) $(tools_kmod_nolib_DEPENDENCIES) $(EXTRA_tools_kmod_nolib_DEPENDENCIES) tools/$(am__dirstamp)
- @rm -f tools/kmod-nolib$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(tools_kmod_nolib_OBJECTS) $(tools_kmod_nolib_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -1028,11 +1235,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod-index.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod-list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod-module.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod-signature.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libkmod/$(DEPDIR)/libkmod.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/delete_module.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/init_module.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/mkdir.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/path.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/testsuite_libtestsuite_la-testsuite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@testsuite/$(DEPDIR)/testsuite_test_alias-test-alias.Po@am__quote@
@@ -1054,6 +1261,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/modinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/modprobe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/rmmod.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/static-nodes.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1237,6 +1445,27 @@ clean-libtool:
distclean-libtool:
-rm -f libtool config.lt
+install-dist_bashcompletionDATA: $(dist_bashcompletion_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bashcompletiondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bashcompletiondir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bashcompletiondir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(bashcompletiondir)" || exit $$?; \
+ done
+
+uninstall-dist_bashcompletionDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_bashcompletion_DATA)'; test -n "$(bashcompletiondir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(bashcompletiondir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
@@ -1286,14 +1515,13 @@ uninstall-includeHEADERS:
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -1314,31 +1542,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-cscopelist-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
- done
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1354,12 +1564,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1371,15 +1576,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1388,18 +1589,16 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
-
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
clean-cscope:
-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
-cscope.files: clean-cscope cscopelist-recursive cscopelist
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -1416,98 +1615,231 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
else \
- skipped="($$skip tests were not run)"; \
+ color_start= color_end=; \
fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+testsuite/test-init.log: testsuite/test-init$(EXEEXT)
+ @p='testsuite/test-init$(EXEEXT)'; \
+ b='testsuite/test-init'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-testsuite.log: testsuite/test-testsuite$(EXEEXT)
+ @p='testsuite/test-testsuite$(EXEEXT)'; \
+ b='testsuite/test-testsuite'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-loaded.log: testsuite/test-loaded$(EXEEXT)
+ @p='testsuite/test-loaded$(EXEEXT)'; \
+ b='testsuite/test-loaded'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-modinfo.log: testsuite/test-modinfo$(EXEEXT)
+ @p='testsuite/test-modinfo$(EXEEXT)'; \
+ b='testsuite/test-modinfo'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-alias.log: testsuite/test-alias$(EXEEXT)
+ @p='testsuite/test-alias$(EXEEXT)'; \
+ b='testsuite/test-alias'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-new-module.log: testsuite/test-new-module$(EXEEXT)
+ @p='testsuite/test-new-module$(EXEEXT)'; \
+ b='testsuite/test-new-module'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-modprobe.log: testsuite/test-modprobe$(EXEEXT)
+ @p='testsuite/test-modprobe$(EXEEXT)'; \
+ b='testsuite/test-modprobe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-blacklist.log: testsuite/test-blacklist$(EXEEXT)
+ @p='testsuite/test-blacklist$(EXEEXT)'; \
+ b='testsuite/test-blacklist'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-dependencies.log: testsuite/test-dependencies$(EXEEXT)
+ @p='testsuite/test-dependencies$(EXEEXT)'; \
+ b='testsuite/test-dependencies'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+testsuite/test-depmod.log: testsuite/test-depmod$(EXEEXT)
+ @p='testsuite/test-depmod$(EXEEXT)'; \
+ b='testsuite/test-depmod'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@case `sed 15q $(srcdir)/NEWS` in \
@@ -1595,10 +1927,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
@@ -1705,7 +2043,7 @@ install-binPROGRAMS: install-libLTLIBRARIES
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
@@ -1728,6 +2066,9 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1749,7 +2090,7 @@ clean: clean-recursive
clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \
clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
+ clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -1770,7 +2111,8 @@ info: info-recursive
info-am:
-install-data-am: install-includeHEADERS install-pkgconfigDATA
+install-data-am: install-dist_bashcompletionDATA \
+ install-includeHEADERS install-pkgconfigDATA
install-dvi: install-dvi-recursive
@@ -1819,37 +2161,39 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
- uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_bashcompletionDATA \
+ uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-pkgconfigDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \
- cscopelist-recursive ctags-recursive install-am \
- install-exec-am install-strip tags-recursive uninstall-am
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-TESTS check-am clean \
- clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \
- clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope cscopelist \
- cscopelist-recursive ctags ctags-recursive dist dist-all \
- dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-compile \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-local distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
+.MAKE: $(am__recursive_targets) all check-am install-am \
+ install-exec-am install-strip uninstall-am
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-TESTS check-am clean clean-binPROGRAMS \
+ clean-checkLTLIBRARIES clean-checkPROGRAMS clean-cscope \
+ clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES cscope cscopelist-am ctags ctags-am \
+ dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
+ dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-local distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dist_bashcompletionDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-exec-hook install-html install-html-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-pkgconfigDATA install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-hook uninstall-includeHEADERS \
- uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
+ pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+ uninstall-am uninstall-binPROGRAMS \
+ uninstall-dist_bashcompletionDATA uninstall-hook \
+ uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-pkgconfigDATA
%.pc: %.pc.in Makefile
@@ -1867,7 +2211,7 @@ install-exec-hook:
uninstall-hook:
rm -f $(DESTDIR)$(rootlibdir)/libkmod.so*
-@BUILD_TOOLS_TRUE@${noinst_SCRIPTS}: tools/kmod-nolib
+@BUILD_TOOLS_TRUE@${noinst_SCRIPTS}: tools/kmod
@BUILD_TOOLS_TRUE@ $(AM_V_GEN) ($(RM) $@; \
@BUILD_TOOLS_TRUE@ $(LN_S) $(notdir $<) $@)
diff --git a/NEWS b/NEWS
index bee70d9..8260183 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,60 @@
+kmod 15
+=======
+
+- Bug fixes:
+ - kmod static-nodes doesn't fail if modules.devname isn't available
+ - Fix getting boolean parameter from kernel cmdline in case the value
+ is omitted
+ - Fix some mkdir_p() corner cases (used in testsuite and static-nodes)
+
+- New features:
+ - kmod static-nodes creates parent directories if given a -o option
+ - kmod binary statically links to libkmod - if distro is only interested
+ in the kmod tool (for example in an initrd) it can refrain from
+ installing the library
+ - Add shell completion for kmod tool
+
+kmod 14
+=======
+
+- Bug fixes:
+ - Fix some format strings
+ - Protect against NULL being passed around to index
+ - Avoid calling syscall() with -1 when finit_module() is not available,
+ since this doesn't always work
+ - Fix not being able to remove alias due to checking the module's
+ refcount
+ - Minor fixes and refactors
+
+- New features:
+ - Improve libkmod documentation, particularly on how flags are dealt
+ with.
+ - Remove ability to build a static libkmod
+ - Add static-nodes command to kmod that parses modules.devname
+ generating output in useful formats
+
+kmod 13
+=======
+
+- Bug fixes:
+ - Add the long option --symbol-prefix option to depmod (it was absent)
+ and fix its behavior
+ - Don't abort if there's a bogus line in configuration file like "alias
+ psmouse off". Some distros are carrying this since the days of
+ modutils
+
+- New features:
+ - Add support for finit_module(2). If the module is load straight from
+ the disk and without compression we use finit_module() syscall when
+ available, falling back to init_module() otherwise
+ - kmod_module_get_info() also returns the signature if the module is
+ signed and modinfo uses it
+ - Use secure_getenv if available
+ - rmmod understands builtin modules, just like modprobe does
+ - Improve compatibility with musl-libc
+ - Test cases exit with success when receiving a signal if they are
+ xfail tests
+
kmod 12
=======
diff --git a/README b/README
index 65499cc..a2a2a5c 100644
--- a/README
+++ b/README
@@ -59,3 +59,60 @@ Gitweb:
Irc:
#kmod on irc.freenode.org
+
+Compatibility with module-init-tools
+====================================
+
+kmod replaces module-init-tools, which is end-of-life. Most of its tools are
+rewritten on top of libkmod so it can be used as a drop in replacements.
+Somethings however were changed. Reasons vary from "the feature was already
+long deprecated on module-init-tools" to "it would be too much trouble to
+support it".
+
+There are several features that are being added in kmod, but we don't
+keep track of them here.
+
+modprobe
+--------
+
+* 'modprobe -l' was marked as deprecated and does not exist anymore
+
+* 'modprobe -t' is gone, together with 'modprobe -l'
+
+* modprobe doesn't parse configuration files with names not ending in
+ '.alias' or '.conf'. modprobe used to warn about these files.
+
+* modprobe doesn't parse 'config' and 'include' commands in configuration
+ files.
+
+* modprobe from m-i-t does not honour softdeps for install commands. E.g.:
+ config:
+
+ install bli "echo bli"
+ install bla "echo bla"
+ softdep bla pre: bli
+
+ With m-i-t, the output of 'modprobe --show-depends bla' will be:
+ install "echo bla"
+
+ While with kmod:
+ install "echo bli"
+ install "echo bla"
+
+* kmod doesn't dump the configuration as is in the config files. Instead it
+ dumps the configuration as it was parsed. Therefore, comments and file names
+ are not dumped, but on the good side we know what the exact configuration
+ kmod is using. We did this because if we only want to know the entire content
+ of configuration files, it's enough to use find(1) in modprobe.d directories
+
+depmod
+------
+
+* there's no 'depmod -m' option: legacy modules.*map files are gone
+
+lsmod
+-----
+
+* module-init-tools used /proc/modules to parse module info. kmod uses
+ /sys/module/*, but there's a fallback to /proc/modules if the latter isn't
+ available
diff --git a/TODO b/TODO
index 4565b75..50e7483 100644
--- a/TODO
+++ b/TODO
@@ -1,9 +1,25 @@
Features:
=========
+* Add command for signing modules
+ - There is a script to sign modules in kernel tree, but we should be able to
+ sign modules by ourselves
+
+* Stop using NOFAIL() and fatal()
+
+* Protect index against OOM
+
+* Implement actions in kmod tool like 'insert', 'remove', 'info', etc
+
* testsuite:
- when fake delete_module() succeeds, remove its entry from /sys/module
+* Stop using system() inside the library and use fork + exec instead
+
+* config: configs that do not need to be matched by fnmatch() could be using a
+ vector instead of a list. This way we could search in it by calling
+ bsearch().
+
* review API, maybe unify all of these getters:
- kmod_module_version_get_symbol()
- kmod_module_version_get_crc()
@@ -15,17 +31,9 @@ Features:
- kmod_module_symbols_free_list()
- kmod_module_dependency_symbols_free_list()
-* Stop using system() inside the library and use fork + exec instead
-
-* config: configs that do not need to be matched by fnmatch() could be using a
- vector instead of a list. This way we could search in it by calling
- bsearch().
-
* index: drop the "open(), seek(), read()" implementation and use another one
with mmap(). When lookup() is called and the file is not mmaped, mmap it.
-* Implement actions in kmod tool like 'insert', 'remove', 'info', etc
-
* Finish removal of "rmmod -w" when it's gone from kernel.
* Deprecate not using KMOD_REMOVE_NOWAIT on libkmod.
@@ -37,57 +45,5 @@ Things to be added/removed in kernel (check what is really needed):
- readdir() in /sys/modules: dir without a 'initstate' file means the
module is builtin.
-* module's size should be available under /sys
- - DONE in 3.3: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=cca3e707301862ca9b9327e6a732463982f8cd1b
-
* kill /proc/modules ?
- Unlikely, given other tools might depend on it
-
-Things that are different from module-init-tools on purpose (!TODO)
-===================================================================
-
-modprobe
---------
-
-* 'modprobe -l' was marked as deprecated and does not exist anymore
-
-* 'modprobe -t' is gone, together with 'modprobe -l'
-
-* there's and additional '--remove-dependencies' flags to modprobe so we
- can remove modules depending on that one
-
-* modprobe doesn't parse configuration files with names not ending in
- '.alias' or '.conf'. modprobe used to warn about these files.
-
-* modprobe doesn't parse 'config' and 'include' commands in configuration
- files.
-
-* modprobe from m-i-t does not honour softdeps for install commands. E.g.:
- config:
-
- install bli "echo bli"
- install bla "echo bla"
- softdep bla pre: bli
-
- With m-i-t, the output of 'modprobe --show-depends bla' will be:
- install "echo bla"
-
- While with kmod:
- install "echo bli"
- install "echo bla"
-
-* kmod doesn't dump the configuration as is in the config files. Instead it
- dumps the configuration as it was parsed. Therefore, comments and file names
- are not dumped, but on the good side we know what the exact configuration
- kmod is using. We did this because if we only want to know the entire content
- of configuration files, it's enough to use find(1) in modprobe.d directories
-
-depmod
-------
-
-* there's no 'depmod -m' option: legacy modules.*map files are gone
-
-lsmod
------
-
-* information is parsed from /sys instead of /proc/modules
diff --git a/aclocal.m4 b/aclocal.m4
index 95c583b..0049dc8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.12.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -219,7 +220,22 @@ m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -231,10 +247,10 @@ m4_popdef([pkg_description])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.12'
+[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.12.5], [],
+m4_if([$1], [1.14], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -250,14 +266,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.5])dnl
+[AM_AUTOMAKE_VERSION([1.14])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -310,7 +326,7 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -341,7 +357,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -532,7 +548,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -543,7 +559,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -572,7 +588,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -608,7 +624,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -617,6 +633,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -629,7 +651,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -659,8 +681,7 @@ AC_SUBST([CYGPATH_W])
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated. For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+ [$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
@@ -714,22 +735,60 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -737,7 +796,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -759,7 +817,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -780,7 +838,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -801,7 +859,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -849,41 +907,9 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -898,8 +924,8 @@ AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -912,8 +938,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
@@ -922,7 +948,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -951,7 +977,54 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -970,7 +1043,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1051,7 +1124,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1111,7 +1184,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1139,7 +1212,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1158,7 +1231,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1177,76 +1250,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
diff --git a/build-aux/compile b/build-aux/compile
index 718dc6d..531136b 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 872b96a..b79252d 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-09-25'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-09-25'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -859,21 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -886,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -957,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1237,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 89b1286..8b612ab 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-10-10'
+timestamp='2013-04-24'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-10-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -259,7 +252,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc \
+ | arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
@@ -293,16 +286,17 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
- | or32 \
+ | or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@@ -372,7 +366,7 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
@@ -410,12 +404,13 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
@@ -1026,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1353,7 +1352,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1499,9 +1498,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1593,6 +1589,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
+ or1k-*)
+ os=-elf
+ ;;
or32-*)
os=-coff
;;
diff --git a/build-aux/depcomp b/build-aux/depcomp
index e1f51f4..4ebd5b3 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-07-12.20; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,9 +27,9 @@ scriptversion=2012-07-12.20; # UTC
case $1 in
'')
- echo "$0: No command. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -56,11 +56,65 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
# A tabulation character.
tab=' '
# A newline character.
nl='
'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
@@ -88,32 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvisualcpp
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
- # This is just like msvc7 but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvc7
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
fi
if test "$depmode" = xlc; then
- # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
- gccflag=-qmakedep=gcc,-MF
- depmode=gcc
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -136,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -163,15 +216,14 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
@@ -180,15 +232,15 @@ gcc)
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
- | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -206,8 +258,7 @@ sgi)
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -215,7 +266,6 @@ sgi)
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
-
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
@@ -223,19 +273,15 @@ sgi)
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr "$nl" ' ' >> "$depfile"
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
-
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
@@ -253,9 +299,8 @@ aix)
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@@ -268,9 +313,7 @@ aix)
"$@" -M
fi
stat=$?
-
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -279,65 +322,37 @@ aix)
do
test -f "$tmpdepfile" && break
done
- if test -f "$tmpdepfile"; then
- # Each line is of the form 'foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
+ aix_post_process_depfile
;;
-icc)
- # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
- # However on
- # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using '\':
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
- # tcc 0.9.26 (FIXME still under development at the moment of writing)
- # will emit a similar output, but also prepend the continuation lines
- # with horizontal tabulation characters.
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
- # Each line is of the form 'foo.o: dependent.h',
- # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
- < "$tmpdepfile" > "$depfile"
- sed '
- s/[ '"$tab"'][ '"$tab"']*/ /g
- s/^ *//
- s/ *\\*$//
- s/^[^:]*: *//
- /^$/d
- /:$/d
- s/$/ :/
- ' < "$tmpdepfile" >> "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -356,34 +371,37 @@ pgcc)
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
+ set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
- base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
- tmpdepfile="$base.d"
+ set_base_from "$source"
+ tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
- lockdir="$base.d-lock"
- trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
numtries=100
i=$numtries
- while test $i -gt 0 ; do
+ while test $i -gt 0; do
# mkdir is a portable test-and-set.
- if mkdir $lockdir 2>/dev/null; then
+ if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
- rm -rf $lockdir
+ rmdir "$lockdir"
break
else
- ## the lock is being held by a different process,
- ## wait until the winning process is done or we timeout
- while test -d $lockdir && test $i -gt 0; do
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
@@ -409,8 +427,8 @@ pgcc)
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -421,9 +439,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -434,8 +451,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -445,76 +461,61 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in 'foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
msvc7)
if test "$libtool" = yes; then
@@ -525,8 +526,7 @@ msvc7)
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
- if test "$stat" = 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -552,6 +552,7 @@ $ {
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
@@ -603,13 +604,14 @@ dashmstdout)
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' "$nl" < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -662,10 +664,12 @@ makedepend)
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -701,10 +705,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -736,15 +740,15 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
"$@" -E 2>/dev/null |
diff --git a/build-aux/missing b/build-aux/missing
index 9a55648..cdea514 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-06-26.16; # UTC
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,61 +29,33 @@ if test $# -eq 0; then
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -98,228 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: '$1' $msg. You should only need it if
- you modified a '.y' file. You may need the Bison package
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.l' file. You may need the Flex package
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.texi' or '.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
;;
-esac
-
-exit 0
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/build-aux/test-driver b/build-aux/test-driver
new file mode 100755
index 0000000..32bf39e
--- /dev/null
+++ b/build-aux/test-driver
@@ -0,0 +1,127 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2012-06-27.10; # UTC
+
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+ [--expect-failure={yes|no}] [--color-tests={yes|no}]
+ [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ esac
+ shift
+done
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ estatus=1
+fi
+
+case $estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.h.in b/config.h.in
index f4ab6fe..ce206c3 100644
--- a/config.h.in
+++ b/config.h.in
@@ -18,12 +18,21 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define to 1 if you have the `finit_module' function. */
+#undef HAVE_FINIT_MODULE
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the <linux/module.h> header file. */
+#undef HAVE_LINUX_MODULE_H
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `secure_getenv' function. */
+#undef HAVE_SECURE_GETENV
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -51,6 +60,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
/* Define to 1 if you have the `__xstat' function. */
#undef HAVE___XSTAT
@@ -58,9 +70,6 @@
*/
#undef LT_OBJDIR
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Name of package */
#undef PACKAGE
diff --git a/configure b/configure
index e014c05..7f3c5ef 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for kmod 12.
+# Generated by GNU Autoconf 2.69 for kmod 15.
#
# Report bugs to <linux-modules@vger.kernel.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='kmod'
PACKAGE_TARNAME='kmod'
-PACKAGE_VERSION='12'
-PACKAGE_STRING='kmod 12'
+PACKAGE_VERSION='15'
+PACKAGE_STRING='kmod 15'
PACKAGE_BUGREPORT='linux-modules@vger.kernel.org'
PACKAGE_URL='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git'
@@ -634,6 +634,7 @@ ac_includes_default="\
ac_default_prefix=/usr
ac_func_list=
+ac_header_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
@@ -661,6 +662,7 @@ BUILD_MANPAGES_FALSE
BUILD_MANPAGES_TRUE
BUILD_TOOLS_FALSE
BUILD_TOOLS_TRUE
+bashcompletiondir
zlib_LIBS
zlib_CFLAGS
liblzma_LIBS
@@ -797,6 +799,7 @@ enable_libtool_lock
with_rootlibdir
with_xz
with_zlib
+with_bashcompletiondir
enable_tools
enable_manpages
enable_logging
@@ -1364,7 +1367,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures kmod 12 to adapt to many kinds of systems.
+\`configure' configures kmod 15 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1434,7 +1437,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of kmod 12:";;
+ short | recursive ) echo "Configuration of kmod 15:";;
esac
cat <<\_ACEOF
@@ -1474,6 +1477,8 @@ Optional Packages:
--with-rootlibdir=DIR rootfs directory to install shared libraries
--with-xz handle Xz-compressed modules [default=disabled]
--with-zlib handle gzipped modules [default=disabled]
+ --with-bashcompletiondir=DIR
+ Bash completions directory
--with-html-dir=PATH path to installed docs
Some influential environment variables:
@@ -1568,7 +1573,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-kmod configure 12
+kmod configure 15
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1994,7 +1999,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by kmod $as_me 12, which was
+It was created by kmod $as_me 15, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2275,6 +2280,10 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
fi
as_fn_append ac_func_list " __xstat"
+as_fn_append ac_func_list " __secure_getenv"
+as_fn_append ac_func_list " secure_getenv"
+as_fn_append ac_func_list " finit_module"
+as_fn_append ac_header_list " linux/module.h"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2374,7 +2383,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-am__api_version='1.12'
+am__api_version='1.14'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -2558,8 +2567,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
@@ -2860,7 +2869,7 @@ fi
# Define the identity of the package.
PACKAGE='kmod'
- VERSION='12'
+ VERSION='15'
cat >>confdefs.h <<_ACEOF
@@ -2901,92 +2910,142 @@ mkdir_p='$(MKDIR_P)'
AMTAR='$${TAR-tar}'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
-$as_echo_n "checking how to create a pax tar archive... " >&6; }
-# Loop over all known methods to create a tar archive until one works.
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar pax cpio none'
-_am_tools=${am_cv_prog_tar_pax-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- { echo "$as_me:$LINENO: $_am_tar --version" >&5
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+$as_echo_n "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
($_am_tar --version) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && break
- done
- am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x pax -w "$$tardir"'
- am__tar_='pax -L -x pax -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H pax -L'
- am__tar_='find "$tardir" -print | cpio -o -H pax -L'
- am__untar='cpio -i -H pax -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_pax}" && break
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
(tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
- rm -rf conftest.dir
- if test -s conftest.tar; then
- { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
($am__untar <conftest.tar) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
-if ${am_cv_prog_tar_pax+:} false; then :
+ if ${am_cv_prog_tar_pax+:} false; then :
$as_echo_n "(cached) " >&6
else
am_cv_prog_tar_pax=$_am_tool
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
$as_echo "$am_cv_prog_tar_pax" >&6; }
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -3839,6 +3898,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -12143,6 +12261,11 @@ CC="$lt_save_CC"
+if test "x$enable_static" = "xyes"; then :
+ as_fn_error $? "--enable-static is not supported by kmod" "$LINENO" 5
+fi
+
+
#####################################################################
# Program checks and configurations
#####################################################################
@@ -12686,6 +12809,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -13045,131 +13227,6 @@ _ACEOF
fi
fi
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
if test $ac_cv_c_compiler_gnu = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
@@ -13653,6 +13710,14 @@ done
+
+
+
+
+
+
+
+
# dietlibc doesn't have st.st_mtim struct member
ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "#include <sys/stat.h>
"
@@ -13666,6 +13731,28 @@ _ACEOF
fi
+# Check kernel headers
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
#####################################################################
# --with-
@@ -13907,6 +13994,24 @@ $as_echo "$as_me: zlib support not requested" >&6;}
fi
+# Check whether --with-bashcompletiondir was given.
+if test "${with_bashcompletiondir+set}" = set; then :
+ withval=$with_bashcompletiondir;
+else
+ if $($PKG_CONFIG --exists bash-completion); then :
+
+ with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
+
+else
+
+ with_bashcompletiondir=${datadir}/bash-completion/completions
+
+fi
+fi
+
+bashcompletiondir=$with_bashcompletiondir
+
+
#####################################################################
# --enable-
#####################################################################
@@ -14240,31 +14345,11 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GTKDOC_DEPS_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met:
-
-$GTKDOC_DEPS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS
-and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+ :
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS
-and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+ :
else
GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS
GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS
@@ -14299,6 +14384,10 @@ fi
enable_gtk_doc_pdf=no
fi
+ if test -z "$AM_DEFAULT_VERBOSITY"; then
+ AM_DEFAULT_VERBOSITY=1
+ fi
+
if test x$enable_gtk_doc = xyes; then
ENABLE_GTK_DOC_TRUE=
@@ -15038,7 +15127,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by kmod $as_me 12, which was
+This file was extended by kmod $as_me 15, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15105,7 +15194,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-kmod config.status 12
+kmod config.status 15
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -16114,7 +16203,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -16165,7 +16254,7 @@ $as_echo X"$mf" |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -16876,7 +16965,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
$PACKAGE $VERSION
- ======
+ =======
prefix: ${prefix}
sysconfdir: ${sysconfdir}
@@ -16884,6 +16973,7 @@ fi
rootlibdir: ${rootlibdir}
includedir: ${includedir}
bindir: ${bindir}
+ Bash completions dir: ${with_bashcompletiondir}
compiler: ${CC}
cflags: ${with_cflags} ${CFLAGS}
@@ -16898,7 +16988,7 @@ fi
" >&5
$as_echo "
$PACKAGE $VERSION
- ======
+ =======
prefix: ${prefix}
sysconfdir: ${sysconfdir}
@@ -16906,6 +16996,7 @@ $as_echo "
rootlibdir: ${rootlibdir}
includedir: ${includedir}
bindir: ${bindir}
+ Bash completions dir: ${with_bashcompletiondir}
compiler: ${CC}
cflags: ${with_cflags} ${CFLAGS}
diff --git a/configure.ac b/configure.ac
index 0f86c25..40e54cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.60)
AC_INIT([kmod],
- [12],
+ [15],
[linux-modules@vger.kernel.org],
[kmod],
[http://git.kernel.org/?p=utils/kernel/kmod/kmod.git])
@@ -8,7 +8,7 @@ AC_INIT([kmod],
AC_CONFIG_SRCDIR([libkmod/libkmod.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules
- tar-pax no-dist-gzip dist-xz subdir-objects color-tests])
+ tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
AC_PROG_CC_STDC
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
@@ -18,6 +18,10 @@ AM_SILENT_RULES([yes])
LT_INIT([disable-static pic-only])
AC_PREFIX_DEFAULT([/usr])
+AS_IF([test "x$enable_static" = "xyes"],
+ [AC_MSG_ERROR([--enable-static is not supported by kmod])])
+
+
#####################################################################
# Program checks and configurations
#####################################################################
@@ -39,10 +43,15 @@ PKG_PROG_PKG_CONFIG
#####################################################################
AC_CHECK_FUNCS_ONCE(__xstat)
+AC_CHECK_FUNCS_ONCE([__secure_getenv secure_getenv])
+AC_CHECK_FUNCS_ONCE([finit_module])
# dietlibc doesn't have st.st_mtim struct member
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
+# Check kernel headers
+AC_CHECK_HEADERS_ONCE([linux/module.h])
+
#####################################################################
# --with-
@@ -73,6 +82,15 @@ AS_IF([test "x$with_zlib" != "xno"], [
AC_MSG_NOTICE([zlib support not requested])
])
+AC_ARG_WITH([bashcompletiondir],
+ AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
+ [],
+ [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
+ with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
+ ] , [
+ with_bashcompletiondir=${datadir}/bash-completion/completions
+ ])])
+AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
#####################################################################
# --enable-
@@ -185,7 +203,7 @@ AC_CONFIG_FILES([
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
- ======
+ =======
prefix: ${prefix}
sysconfdir: ${sysconfdir}
@@ -193,6 +211,7 @@ AC_MSG_RESULT([
rootlibdir: ${rootlibdir}
includedir: ${includedir}
bindir: ${bindir}
+ Bash completions dir: ${with_bashcompletiondir}
compiler: ${CC}
cflags: ${with_cflags} ${CFLAGS}
diff --git a/libkmod/README b/libkmod/README
index d0ca2fc..3e1c8dc 100644
--- a/libkmod/README
+++ b/libkmod/README
@@ -20,7 +20,7 @@ Every user should create and manage it's own library context with:
kmod_unref(ctx);
-Modules can be created with by various means:
+Modules can be created by various means:
struct kmod_module *mod;
int err;
diff --git a/libkmod/docs/Makefile.am b/libkmod/docs/Makefile.am
index 77e20d5..7c67581 100644
--- a/libkmod/docs/Makefile.am
+++ b/libkmod/docs/Makefile.am
@@ -21,7 +21,7 @@ HFILE_GLOB = $(top_srcdir)/libkmod/libkmod.h
CFILE_GLOB = $(top_srcdir)/libkmod/libkmod.c $(top_srcdir)/libkmod/libkmod-module.c $(top_srcdir)/libkmod/libkmod-list.c
IGNORE_HFILES = macro.h \
- libkmod-private.h \
+ libkmod-internal.h \
libkmod-util.h \
libkmod-array.h \
libkmod-hash.h \
diff --git a/libkmod/docs/Makefile.in b/libkmod/docs/Makefile.in
index 2a52b3d..e99e6be 100644
--- a/libkmod/docs/Makefile.in
+++ b/libkmod/docs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,23 +20,51 @@
# Everything below here is generic #
####################################
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
esac; \
- test $$am__dry = yes; \
- }
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -55,9 +83,9 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/version.xml.in \
- $(top_srcdir)/libkmod/docs/gtk-doc.make
+DIST_COMMON = $(top_srcdir)/libkmod/docs/gtk-doc.make \
+ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(srcdir)/version.xml.in
subdir = libkmod/docs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
@@ -90,6 +118,7 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -177,6 +206,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+bashcompletiondir = @bashcompletiondir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -234,7 +264,7 @@ MKHTML_OPTIONS = --path=$(abs_srcdir)/doc --path=$(abs_builddir)/doc
HFILE_GLOB = $(top_srcdir)/libkmod/libkmod.h
CFILE_GLOB = $(top_srcdir)/libkmod/libkmod.c $(top_srcdir)/libkmod/libkmod-module.c $(top_srcdir)/libkmod/libkmod-list.c
IGNORE_HFILES = macro.h \
- libkmod-private.h \
+ libkmod-internal.h \
libkmod-util.h \
libkmod-array.h \
libkmod-hash.h \
@@ -287,6 +317,37 @@ content_files = version.xml
@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp
@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP =
@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp
+
+#### setup ####
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build";
+
+#### scan ####
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files";
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects";
+
+#### xml ####
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_0 = @echo " DOC Building XML";
+
+#### html ####
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_0 = @echo " DOC Building HTML";
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references";
+
+#### pdf ####
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY))
+@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_0 = @echo " DOC Building PDF";
all: all-am
.SUFFIXES:
@@ -329,11 +390,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
cscope cscopelist:
@@ -409,8 +468,8 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_GTK_DOC_FALSE@uninstall-local:
-@ENABLE_GTK_DOC_FALSE@distclean-local:
@ENABLE_GTK_DOC_FALSE@install-data-local:
+@ENABLE_GTK_DOC_FALSE@distclean-local:
@ENABLE_GTK_DOC_FALSE@maintainer-clean-local:
@ENABLE_GTK_DOC_FALSE@clean-local:
clean: clean-am
@@ -483,18 +542,18 @@ uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: all all-am all-local check check-am clean clean-generic \
- clean-libtool clean-local dist-hook distclean \
- distclean-generic distclean-libtool distclean-local distdir \
- dvi dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic \
+ clean-libtool clean-local cscopelist-am ctags-am dist-hook \
+ distclean distclean-generic distclean-libtool distclean-local \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
maintainer-clean-local mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-local
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-local
@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
@@ -504,32 +563,25 @@ uninstall-am: uninstall-local
@ENABLE_GTK_DOC_TRUE@$(REPORT_FILES): sgml-build.stamp
-#### setup ####
-
@ENABLE_GTK_DOC_TRUE@setup-build.stamp:
-@ENABLE_GTK_DOC_TRUE@ -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
-@ENABLE_GTK_DOC_TRUE@ echo ' DOC Preparing build'; \
+@ENABLE_GTK_DOC_TRUE@ -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
@ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
@ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \
@ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \
@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \
-@ENABLE_GTK_DOC_TRUE@ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+@ENABLE_GTK_DOC_TRUE@ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
@ENABLE_GTK_DOC_TRUE@ done; \
@ENABLE_GTK_DOC_TRUE@ fi; \
@ENABLE_GTK_DOC_TRUE@ fi
-@ENABLE_GTK_DOC_TRUE@ @touch setup-build.stamp
-
-#### scan ####
+@ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch setup-build.stamp
@ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
-@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Scanning header files'
-@ENABLE_GTK_DOC_TRUE@ @_source_dir='' ; \
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_SCAN)_source_dir='' ; \
@ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \
@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \
@ENABLE_GTK_DOC_TRUE@ done ; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
-@ENABLE_GTK_DOC_TRUE@ @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
-@ENABLE_GTK_DOC_TRUE@ echo " DOC Introspecting gobjects"; \
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
@ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
@ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \
@@ -544,32 +596,25 @@ uninstall-am: uninstall-local
@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \
@ENABLE_GTK_DOC_TRUE@ done \
@ENABLE_GTK_DOC_TRUE@ fi
-@ENABLE_GTK_DOC_TRUE@ @touch scan-build.stamp
+@ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch scan-build.stamp
@ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@ENABLE_GTK_DOC_TRUE@ @true
-#### xml ####
-
@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
-@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building XML'
-@ENABLE_GTK_DOC_TRUE@ @_source_dir='' ; \
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)_source_dir='' ; \
@ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \
@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \
@ENABLE_GTK_DOC_TRUE@ done ; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
-@ENABLE_GTK_DOC_TRUE@ @touch sgml-build.stamp
+@ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch sgml-build.stamp
@ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp
@ENABLE_GTK_DOC_TRUE@ @true
-#### html ####
-
@ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building HTML'
-@ENABLE_GTK_DOC_TRUE@ @rm -rf html
-@ENABLE_GTK_DOC_TRUE@ @mkdir html
-@ENABLE_GTK_DOC_TRUE@ @mkhtml_options=""; \
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
+@ENABLE_GTK_DOC_TRUE@ mkhtml_options=""; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
@ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \
@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \
@@ -590,16 +635,12 @@ uninstall-am: uninstall-local
@ENABLE_GTK_DOC_TRUE@ cp $(abs_builddir)/$$file $(abs_builddir)/html; \
@ENABLE_GTK_DOC_TRUE@ fi; \
@ENABLE_GTK_DOC_TRUE@ done;
-@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Fixing cross-references'
-@ENABLE_GTK_DOC_TRUE@ @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
-@ENABLE_GTK_DOC_TRUE@ @touch html-build.stamp
-
-#### pdf ####
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+@ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch html-build.stamp
@ENABLE_GTK_DOC_TRUE@pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-@ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building PDF'
-@ENABLE_GTK_DOC_TRUE@ @rm -f $(DOC_MODULE).pdf
-@ENABLE_GTK_DOC_TRUE@ @mkpdf_options=""; \
+@ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
+@ENABLE_GTK_DOC_TRUE@ mkpdf_options=""; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
@ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \
@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \
@@ -616,7 +657,7 @@ uninstall-am: uninstall-local
@ENABLE_GTK_DOC_TRUE@ done; \
@ENABLE_GTK_DOC_TRUE@ fi; \
@ENABLE_GTK_DOC_TRUE@ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
-@ENABLE_GTK_DOC_TRUE@ @touch pdf-build.stamp
+@ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch pdf-build.stamp
##############
@@ -631,7 +672,7 @@ uninstall-am: uninstall-local
@ENABLE_GTK_DOC_TRUE@ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
@ENABLE_GTK_DOC_TRUE@ fi
-@ENABLE_GTK_DOC_TRUE@maintainer-clean-local: clean
+@ENABLE_GTK_DOC_TRUE@maintainer-clean-local:
@ENABLE_GTK_DOC_TRUE@ @rm -rf xml html
@ENABLE_GTK_DOC_TRUE@install-data-local:
@@ -667,7 +708,7 @@ uninstall-am: uninstall-local
#
# Require gtk-doc when making dist
#
-@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs
#dist-check-gtkdoc:
# @echo "*** gtk-doc must be installed and enabled in order to make dist"
# @false
diff --git a/libkmod/docs/gtk-doc.make b/libkmod/docs/gtk-doc.make
index 9841de4..104c399 100644
--- a/libkmod/docs/gtk-doc.make
+++ b/libkmod/docs/gtk-doc.make
@@ -74,31 +74,40 @@ $(REPORT_FILES): sgml-build.stamp
#### setup ####
+GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V))
+GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_SETUP_0=@echo " DOC Preparing build";
+
setup-build.stamp:
- -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
- echo ' DOC Preparing build'; \
+ -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
if test "x$$files" != "x" ; then \
for file in $$files ; do \
test -f $(abs_srcdir)/$$file && \
- cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
done; \
fi; \
fi
- @touch setup-build.stamp
+ $(AM_V_at)touch setup-build.stamp
#### scan ####
+GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V))
+GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files";
+
+GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V))
+GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects";
+
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
- @echo ' DOC Scanning header files'
- @_source_dir='' ; \
+ $(GTK_DOC_V_SCAN)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
- @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
- echo " DOC Introspecting gobjects"; \
+ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
scanobj_options=""; \
gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$(?)" = "0"; then \
@@ -113,32 +122,41 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
test -f $$i || touch $$i ; \
done \
fi
- @touch scan-build.stamp
+ $(AM_V_at)touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### xml ####
+GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V))
+GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_XML_0=@echo " DOC Building XML";
+
sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
- @echo ' DOC Building XML'
- @_source_dir='' ; \
+ $(GTK_DOC_V_XML)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
- @touch sgml-build.stamp
+ $(AM_V_at)touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@true
#### html ####
+GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V))
+GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_HTML_0=@echo " DOC Building HTML";
+
+GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V))
+GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
+
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo ' DOC Building HTML'
- @rm -rf html
- @mkdir html
- @mkhtml_options=""; \
+ $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
+ mkhtml_options=""; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$(?)" = "0"; then \
if test "x$(V)" = "x1"; then \
@@ -159,16 +177,18 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
cp $(abs_builddir)/$$file $(abs_builddir)/html; \
fi; \
done;
- @echo ' DOC Fixing cross-references'
- @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
- @touch html-build.stamp
+ $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ $(AM_V_at)touch html-build.stamp
#### pdf ####
+GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V))
+GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
+
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo ' DOC Building PDF'
- @rm -f $(DOC_MODULE).pdf
- @mkpdf_options=""; \
+ $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
+ mkpdf_options=""; \
gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$(?)" = "0"; then \
if test "x$(V)" = "x1"; then \
@@ -185,7 +205,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
done; \
fi; \
gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
- @touch pdf-build.stamp
+ $(AM_V_at)touch pdf-build.stamp
##############
@@ -200,7 +220,7 @@ distclean-local:
rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
fi
-maintainer-clean-local: clean
+maintainer-clean-local:
@rm -rf xml html
install-data-local:
@@ -237,7 +257,7 @@ uninstall-local:
# Require gtk-doc when making dist
#
if ENABLE_GTK_DOC
-dist-check-gtkdoc:
+dist-check-gtkdoc: docs
else
dist-check-gtkdoc:
@echo "*** gtk-doc must be installed and enabled in order to make dist"
diff --git a/libkmod/docs/html/api-index-full.html b/libkmod/docs/html/api-index-full.html
new file mode 100644
index 0000000..b038bd5
--- /dev/null
+++ b/libkmod/docs/html/api-index-full.html
@@ -0,0 +1,370 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>API Index</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="index.html" title="libkmod Reference Manual">
+<link rel="prev" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libkmod-libkmod-loaded.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td> </td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a class="shortcut" href="#idxC">C</a>
+  | 
+ <a class="shortcut" href="#idxD">D</a>
+  | 
+ <a class="shortcut" href="#idxG">G</a>
+  | 
+ <a class="shortcut" href="#idxL">L</a>
+  | 
+ <a class="shortcut" href="#idxM">M</a>
+  | 
+ <a class="shortcut" href="#idxN">N</a>
+  | 
+ <a class="shortcut" href="#idxR">R</a>
+  | 
+ <a class="shortcut" href="#idxS">S</a>
+  | 
+ <a class="shortcut" href="#idxU">U</a>
+  | 
+ <a class="shortcut" href="#idxV">V</a>
+</td></tr>
+</table>
+<div class="index">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="api-index-full"></a>API Index</h1></div></div></div>
+<a name="idx"></a><a name="idxC"></a><h3 class="title">C</h3>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-aliases" title="kmod_config_get_aliases ()">kmod_config_get_aliases</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-blacklists" title="kmod_config_get_blacklists ()">kmod_config_get_blacklists</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-install-commands" title="kmod_config_get_install_commands ()">kmod_config_get_install_commands</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-options" title="kmod_config_get_options ()">kmod_config_get_options</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-remove-commands" title="kmod_config_get_remove_commands ()">kmod_config_get_remove_commands</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-get-softdeps" title="kmod_config_get_softdeps ()">kmod_config_get_softdeps</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter">kmod_config_iter</a>, struct in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()">kmod_config_iter_free_iter</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()">kmod_config_iter_get_key</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()">kmod_config_iter_get_value</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()">kmod_config_iter_next</a>, function in <a class="link" href="libkmod-libkmod-config.html" title="libkmod-config">libkmod-config</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx">kmod_ctx</a>, struct in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxD"></a><h3 class="title">D</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-dump-index" title="kmod_dump_index ()">kmod_dump_index</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxG"></a><h3 class="title">G</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-get-log-priority" title="kmod_get_log_priority ()">kmod_get_log_priority</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-get-userdata" title="kmod_get_userdata ()">kmod_get_userdata</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxL"></a><h3 class="title">L</h3>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list">kmod_list</a>, struct in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list-foreach" title="kmod_list_foreach()">kmod_list_foreach</a>, macro in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list-foreach-reverse" title="kmod_list_foreach_reverse()">kmod_list_foreach_reverse</a>, macro in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list-last" title="kmod_list_last ()">kmod_list_last</a>, function in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list-next" title="kmod_list_next ()">kmod_list_next</a>, function in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-list.html#kmod-list-prev" title="kmod_list_prev ()">kmod_list_prev</a>, function in <a class="link" href="libkmod-libkmod-list.html" title="libkmod-list">libkmod-list</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-load-resources" title="kmod_load_resources ()">kmod_load_resources</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxM"></a><h3 class="title">M</h3>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module">kmod_module</a>, struct in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-apply-filter" title="kmod_module_apply_filter ()">kmod_module_apply_filter</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list" title="kmod_module_dependency_symbols_free_list ()">kmod_module_dependency_symbols_free_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-bind" title="kmod_module_dependency_symbol_get_bind ()">kmod_module_dependency_symbol_get_bind</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-crc" title="kmod_module_dependency_symbol_get_crc ()">kmod_module_dependency_symbol_get_crc</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-symbol" title="kmod_module_dependency_symbol_get_symbol ()">kmod_module_dependency_symbol_get_symbol</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-dependencies" title="kmod_module_get_dependencies ()">kmod_module_get_dependencies</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-dependency-symbols" title="kmod_module_get_dependency_symbols ()">kmod_module_get_dependency_symbols</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-filtered-blacklist" title="kmod_module_get_filtered_blacklist ()">kmod_module_get_filtered_blacklist</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-holders" title="kmod_module_get_holders ()">kmod_module_get_holders</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-info" title="kmod_module_get_info ()">kmod_module_get_info</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-initstate" title="kmod_module_get_initstate ()">kmod_module_get_initstate</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-install-commands" title="kmod_module_get_install_commands ()">kmod_module_get_install_commands</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-module" title="kmod_module_get_module ()">kmod_module_get_module</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-name" title="kmod_module_get_name ()">kmod_module_get_name</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-options" title="kmod_module_get_options ()">kmod_module_get_options</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-path" title="kmod_module_get_path ()">kmod_module_get_path</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-refcnt" title="kmod_module_get_refcnt ()">kmod_module_get_refcnt</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-remove-commands" title="kmod_module_get_remove_commands ()">kmod_module_get_remove_commands</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-sections" title="kmod_module_get_sections ()">kmod_module_get_sections</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-size" title="kmod_module_get_size ()">kmod_module_get_size</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-softdeps" title="kmod_module_get_softdeps ()">kmod_module_get_softdeps</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-symbols" title="kmod_module_get_symbols ()">kmod_module_get_symbols</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-get-versions" title="kmod_module_get_versions ()">kmod_module_get_versions</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-free-list" title="kmod_module_info_free_list ()">kmod_module_info_free_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-key" title="kmod_module_info_get_key ()">kmod_module_info_get_key</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-value" title="kmod_module_info_get_value ()">kmod_module_info_get_value</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-initstate-str" title="kmod_module_initstate_str ()">kmod_module_initstate_str</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-insert-module" title="kmod_module_insert_module ()">kmod_module_insert_module</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-loaded.html#kmod-module-new-from-loaded" title="kmod_module_new_from_loaded ()">kmod_module_new_from_loaded</a>, function in <a class="link" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">libkmod-loaded</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-lookup" title="kmod_module_new_from_lookup ()">kmod_module_new_from_lookup</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-name" title="kmod_module_new_from_name ()">kmod_module_new_from_name</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-path" title="kmod_module_new_from_path ()">kmod_module_new_from_path</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-probe-insert-module" title="kmod_module_probe_insert_module ()">kmod_module_probe_insert_module</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-ref" title="kmod_module_ref ()">kmod_module_ref</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-remove-module" title="kmod_module_remove_module ()">kmod_module_remove_module</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-section-free-list" title="kmod_module_section_free_list ()">kmod_module_section_free_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-address" title="kmod_module_section_get_address ()">kmod_module_section_get_address</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-name" title="kmod_module_section_get_name ()">kmod_module_section_get_name</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbols-free-list" title="kmod_module_symbols_free_list ()">kmod_module_symbols_free_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-crc" title="kmod_module_symbol_get_crc ()">kmod_module_symbol_get_crc</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-symbol" title="kmod_module_symbol_get_symbol ()">kmod_module_symbol_get_symbol</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-unref" title="kmod_module_unref ()">kmod_module_unref</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()">kmod_module_unref_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-versions-free-list" title="kmod_module_versions_free_list ()">kmod_module_versions_free_list</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-crc" title="kmod_module_version_get_crc ()">kmod_module_version_get_crc</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-symbol" title="kmod_module_version_get_symbol ()">kmod_module_version_get_symbol</a>, function in <a class="link" href="libkmod-libkmod-module.html" title="libkmod-module">libkmod-module</a>
+</dt>
+<dd></dd>
+<a name="idxN"></a><h3 class="title">N</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-new" title="kmod_new ()">kmod_new</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxR"></a><h3 class="title">R</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-ref" title="kmod_ref ()">kmod_ref</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxS"></a><h3 class="title">S</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-set-log-fn" title="kmod_set_log_fn ()">kmod_set_log_fn</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-set-log-priority" title="kmod_set_log_priority ()">kmod_set_log_priority</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-set-userdata" title="kmod_set_userdata ()">kmod_set_userdata</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxU"></a><h3 class="title">U</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-unload-resources" title="kmod_unload_resources ()">kmod_unload_resources</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-unref" title="kmod_unref ()">kmod_unref</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+<a name="idxV"></a><h3 class="title">V</h3>
+<dt>
+<a class="link" href="libkmod-libkmod.html#kmod-validate-resources" title="kmod_validate_resources ()">kmod_validate_resources</a>, function in <a class="link" href="libkmod-libkmod.html" title="libkmod">libkmod</a>
+</dt>
+<dd></dd>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/ch01.html b/libkmod/docs/html/ch01.html
new file mode 100644
index 0000000..37e2f23
--- /dev/null
+++ b/libkmod/docs/html/ch01.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="index.html" title="libkmod Reference Manual">
+<link rel="prev" href="index.html" title="libkmod Reference Manual">
+<link rel="next" href="libkmod-libkmod.html" title="libkmod">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td> </td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="libkmod-libkmod.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="id-1.2"></a>libkmod</h1></div></div></div>
+<div class="toc"><dl class="toc">
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod.html">libkmod</a></span><span class="refpurpose"> — libkmod context</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-list.html">libkmod-list</a></span><span class="refpurpose"> — general purpose list</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-config.html">libkmod-config</a></span><span class="refpurpose"> — retrieve current libkmod configuration</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-module.html">libkmod-module</a></span><span class="refpurpose"> — operate on kernel modules</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-loaded.html">libkmod-loaded</a></span><span class="refpurpose"> — currently loaded modules</span>
+</dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/home.png b/libkmod/docs/html/home.png
new file mode 100644
index 0000000..1700361
--- /dev/null
+++ b/libkmod/docs/html/home.png
Binary files differ
diff --git a/libkmod/docs/html/index.html b/libkmod/docs/html/index.html
new file mode 100644
index 0000000..f29238e
--- /dev/null
+++ b/libkmod/docs/html/index.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="next" href="ch01.html" title="libkmod">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<div class="book">
+<div class="titlepage">
+<div>
+<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libkmod Reference Manual</p></th></tr></table></div>
+<div><p class="releaseinfo">for libkmod version 15
+</p></div>
+</div>
+<hr>
+</div>
+<div class="toc"><dl class="toc">
+<dt><span class="chapter"><a href="ch01.html">libkmod</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod.html">libkmod</a></span><span class="refpurpose"> — libkmod context</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-list.html">libkmod-list</a></span><span class="refpurpose"> — general purpose list</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-config.html">libkmod-config</a></span><span class="refpurpose"> — retrieve current libkmod configuration</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-module.html">libkmod-module</a></span><span class="refpurpose"> — operate on kernel modules</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libkmod-libkmod-loaded.html">libkmod-loaded</a></span><span class="refpurpose"> — currently loaded modules</span>
+</dt>
+</dl></dd>
+<dt><span class="index"><a href="api-index-full.html">API Index</a></span></dt>
+</dl></div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/index.sgml b/libkmod/docs/html/index.sgml
new file mode 100644
index 0000000..165c1dc
--- /dev/null
+++ b/libkmod/docs/html/index.sgml
@@ -0,0 +1,97 @@
+<ANCHOR id="libkmod-libkmod" href="libkmod/libkmod-libkmod.html">
+<ANCHOR id="libkmod-libkmod.synopsis" href="libkmod/libkmod-libkmod.html#libkmod-libkmod.synopsis">
+<ANCHOR id="libkmod-libkmod.description" href="libkmod/libkmod-libkmod.html#libkmod-libkmod.description">
+<ANCHOR id="libkmod-libkmod.details" href="libkmod/libkmod-libkmod.html#libkmod-libkmod.details">
+<ANCHOR id="kmod-ctx" href="libkmod/libkmod-libkmod.html#kmod-ctx">
+<ANCHOR id="kmod-new" href="libkmod/libkmod-libkmod.html#kmod-new">
+<ANCHOR id="kmod-ref" href="libkmod/libkmod-libkmod.html#kmod-ref">
+<ANCHOR id="kmod-unref" href="libkmod/libkmod-libkmod.html#kmod-unref">
+<ANCHOR id="kmod-load-resources" href="libkmod/libkmod-libkmod.html#kmod-load-resources">
+<ANCHOR id="kmod-unload-resources" href="libkmod/libkmod-libkmod.html#kmod-unload-resources">
+<ANCHOR id="kmod-validate-resources" href="libkmod/libkmod-libkmod.html#kmod-validate-resources">
+<ANCHOR id="kmod-dump-index" href="libkmod/libkmod-libkmod.html#kmod-dump-index">
+<ANCHOR id="kmod-set-log-priority" href="libkmod/libkmod-libkmod.html#kmod-set-log-priority">
+<ANCHOR id="kmod-get-log-priority" href="libkmod/libkmod-libkmod.html#kmod-get-log-priority">
+<ANCHOR id="kmod-set-log-fn" href="libkmod/libkmod-libkmod.html#kmod-set-log-fn">
+<ANCHOR id="kmod-get-userdata" href="libkmod/libkmod-libkmod.html#kmod-get-userdata">
+<ANCHOR id="kmod-set-userdata" href="libkmod/libkmod-libkmod.html#kmod-set-userdata">
+<ANCHOR id="libkmod-libkmod-list" href="libkmod/libkmod-libkmod-list.html">
+<ANCHOR id="libkmod-libkmod-list.synopsis" href="libkmod/libkmod-libkmod-list.html#libkmod-libkmod-list.synopsis">
+<ANCHOR id="libkmod-libkmod-list.description" href="libkmod/libkmod-libkmod-list.html#libkmod-libkmod-list.description">
+<ANCHOR id="libkmod-libkmod-list.details" href="libkmod/libkmod-libkmod-list.html#libkmod-libkmod-list.details">
+<ANCHOR id="kmod-list" href="libkmod/libkmod-libkmod-list.html#kmod-list">
+<ANCHOR id="kmod-list-foreach" href="libkmod/libkmod-libkmod-list.html#kmod-list-foreach">
+<ANCHOR id="kmod-list-foreach-reverse" href="libkmod/libkmod-libkmod-list.html#kmod-list-foreach-reverse">
+<ANCHOR id="kmod-list-last" href="libkmod/libkmod-libkmod-list.html#kmod-list-last">
+<ANCHOR id="kmod-list-next" href="libkmod/libkmod-libkmod-list.html#kmod-list-next">
+<ANCHOR id="kmod-list-prev" href="libkmod/libkmod-libkmod-list.html#kmod-list-prev">
+<ANCHOR id="libkmod-libkmod-config" href="libkmod/libkmod-libkmod-config.html">
+<ANCHOR id="libkmod-libkmod-config.synopsis" href="libkmod/libkmod-libkmod-config.html#libkmod-libkmod-config.synopsis">
+<ANCHOR id="libkmod-libkmod-config.description" href="libkmod/libkmod-libkmod-config.html#libkmod-libkmod-config.description">
+<ANCHOR id="libkmod-libkmod-config.details" href="libkmod/libkmod-libkmod-config.html#libkmod-libkmod-config.details">
+<ANCHOR id="kmod-config-iter" href="libkmod/libkmod-libkmod-config.html#kmod-config-iter">
+<ANCHOR id="kmod-config-get-blacklists" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-blacklists">
+<ANCHOR id="kmod-config-get-install-commands" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-install-commands">
+<ANCHOR id="kmod-config-get-remove-commands" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-remove-commands">
+<ANCHOR id="kmod-config-get-aliases" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-aliases">
+<ANCHOR id="kmod-config-get-options" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-options">
+<ANCHOR id="kmod-config-get-softdeps" href="libkmod/libkmod-libkmod-config.html#kmod-config-get-softdeps">
+<ANCHOR id="kmod-config-iter-get-key" href="libkmod/libkmod-libkmod-config.html#kmod-config-iter-get-key">
+<ANCHOR id="kmod-config-iter-get-value" href="libkmod/libkmod-libkmod-config.html#kmod-config-iter-get-value">
+<ANCHOR id="kmod-config-iter-next" href="libkmod/libkmod-libkmod-config.html#kmod-config-iter-next">
+<ANCHOR id="kmod-config-iter-free-iter" href="libkmod/libkmod-libkmod-config.html#kmod-config-iter-free-iter">
+<ANCHOR id="libkmod-libkmod-module" href="libkmod/libkmod-libkmod-module.html">
+<ANCHOR id="libkmod-libkmod-module.synopsis" href="libkmod/libkmod-libkmod-module.html#libkmod-libkmod-module.synopsis">
+<ANCHOR id="libkmod-libkmod-module.description" href="libkmod/libkmod-libkmod-module.html#libkmod-libkmod-module.description">
+<ANCHOR id="libkmod-libkmod-module.details" href="libkmod/libkmod-libkmod-module.html#libkmod-libkmod-module.details">
+<ANCHOR id="kmod-module" href="libkmod/libkmod-libkmod-module.html#kmod-module">
+<ANCHOR id="kmod-module-new-from-lookup" href="libkmod/libkmod-libkmod-module.html#kmod-module-new-from-lookup">
+<ANCHOR id="kmod-module-new-from-name" href="libkmod/libkmod-libkmod-module.html#kmod-module-new-from-name">
+<ANCHOR id="kmod-module-new-from-path" href="libkmod/libkmod-libkmod-module.html#kmod-module-new-from-path">
+<ANCHOR id="kmod-module-ref" href="libkmod/libkmod-libkmod-module.html#kmod-module-ref">
+<ANCHOR id="kmod-module-unref" href="libkmod/libkmod-libkmod-module.html#kmod-module-unref">
+<ANCHOR id="kmod-module-unref-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-unref-list">
+<ANCHOR id="kmod-module-insert-module" href="libkmod/libkmod-libkmod-module.html#kmod-module-insert-module">
+<ANCHOR id="kmod-module-probe-insert-module" href="libkmod/libkmod-libkmod-module.html#kmod-module-probe-insert-module">
+<ANCHOR id="kmod-module-remove-module" href="libkmod/libkmod-libkmod-module.html#kmod-module-remove-module">
+<ANCHOR id="kmod-module-get-module" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-module">
+<ANCHOR id="kmod-module-get-dependencies" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-dependencies">
+<ANCHOR id="kmod-module-get-softdeps" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-softdeps">
+<ANCHOR id="kmod-module-apply-filter" href="libkmod/libkmod-libkmod-module.html#kmod-module-apply-filter">
+<ANCHOR id="kmod-module-get-filtered-blacklist" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-filtered-blacklist">
+<ANCHOR id="kmod-module-get-install-commands" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-install-commands">
+<ANCHOR id="kmod-module-get-remove-commands" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-remove-commands">
+<ANCHOR id="kmod-module-get-name" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-name">
+<ANCHOR id="kmod-module-get-options" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-options">
+<ANCHOR id="kmod-module-get-path" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-path">
+<ANCHOR id="kmod-module-get-dependency-symbols" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-dependency-symbols">
+<ANCHOR id="kmod-module-dependency-symbol-get-bind" href="libkmod/libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-bind">
+<ANCHOR id="kmod-module-dependency-symbol-get-crc" href="libkmod/libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-crc">
+<ANCHOR id="kmod-module-dependency-symbol-get-symbol" href="libkmod/libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-symbol">
+<ANCHOR id="kmod-module-dependency-symbols-free-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list">
+<ANCHOR id="kmod-module-get-sections" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-sections">
+<ANCHOR id="kmod-module-section-free-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-section-free-list">
+<ANCHOR id="kmod-module-section-get-address" href="libkmod/libkmod-libkmod-module.html#kmod-module-section-get-address">
+<ANCHOR id="kmod-module-section-get-name" href="libkmod/libkmod-libkmod-module.html#kmod-module-section-get-name">
+<ANCHOR id="kmod-module-get-symbols" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-symbols">
+<ANCHOR id="kmod-module-symbol-get-crc" href="libkmod/libkmod-libkmod-module.html#kmod-module-symbol-get-crc">
+<ANCHOR id="kmod-module-symbol-get-symbol" href="libkmod/libkmod-libkmod-module.html#kmod-module-symbol-get-symbol">
+<ANCHOR id="kmod-module-symbols-free-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-symbols-free-list">
+<ANCHOR id="kmod-module-get-versions" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-versions">
+<ANCHOR id="kmod-module-version-get-crc" href="libkmod/libkmod-libkmod-module.html#kmod-module-version-get-crc">
+<ANCHOR id="kmod-module-version-get-symbol" href="libkmod/libkmod-libkmod-module.html#kmod-module-version-get-symbol">
+<ANCHOR id="kmod-module-versions-free-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-versions-free-list">
+<ANCHOR id="kmod-module-get-info" href="libkmod/libkmod-libkmod-module.html#kmod-module-get-info">
+<ANCHOR id="kmod-module-info-free-list" href="libkmod/libkmod-libkmod-module.html#kmod-module-info-free-list">
+<ANCHOR id="kmod-module-info-get-key" href="libkmod/libkmod-libkmod-module.html#kmod-module-info-get-key">
+<ANCHOR id="kmod-module-info-get-value" href="libkmod/libkmod-libkmod-module.html#kmod-module-info-get-value">
+<ANCHOR id="libkmod-libkmod-loaded" href="libkmod/libkmod-libkmod-loaded.html">
+<ANCHOR id="libkmod-libkmod-loaded.synopsis" href="libkmod/libkmod-libkmod-loaded.html#libkmod-libkmod-loaded.synopsis">
+<ANCHOR id="libkmod-libkmod-loaded.description" href="libkmod/libkmod-libkmod-loaded.html#libkmod-libkmod-loaded.description">
+<ANCHOR id="libkmod-libkmod-loaded.details" href="libkmod/libkmod-libkmod-loaded.html#libkmod-libkmod-loaded.details">
+<ANCHOR id="kmod-module-new-from-loaded" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-new-from-loaded">
+<ANCHOR id="kmod-module-get-initstate" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-get-initstate">
+<ANCHOR id="kmod-module-initstate-str" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-initstate-str">
+<ANCHOR id="kmod-module-get-size" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-get-size">
+<ANCHOR id="kmod-module-get-refcnt" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-get-refcnt">
+<ANCHOR id="kmod-module-get-holders" href="libkmod/libkmod-libkmod-loaded.html#kmod-module-get-holders">
diff --git a/libkmod/docs/html/left.png b/libkmod/docs/html/left.png
new file mode 100644
index 0000000..2d05b3d
--- /dev/null
+++ b/libkmod/docs/html/left.png
Binary files differ
diff --git a/libkmod/docs/html/libkmod-libkmod-config.html b/libkmod/docs/html/libkmod-libkmod-config.html
new file mode 100644
index 0000000..f88935e
--- /dev/null
+++ b/libkmod/docs/html/libkmod-libkmod-config.html
@@ -0,0 +1,338 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod-config</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="ch01.html" title="libkmod">
+<link rel="prev" href="libkmod-libkmod-list.html" title="libkmod-list">
+<link rel="next" href="libkmod-libkmod-module.html" title="libkmod-module">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libkmod-libkmod-list.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="libkmod-libkmod-module.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libkmod-libkmod-config.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libkmod-libkmod-config.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libkmod-libkmod-config"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libkmod-libkmod-config.top_of_page"></a>libkmod-config</span></h2>
+<p>libkmod-config — retrieve current libkmod configuration</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libkmod-libkmod-config.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter">kmod_config_iter</a>;
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-blacklists" title="kmod_config_get_blacklists ()">kmod_config_get_blacklists</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-install-commands" title="kmod_config_get_install_commands ()">kmod_config_get_install_commands</a>
+ (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-remove-commands" title="kmod_config_get_remove_commands ()">kmod_config_get_remove_commands</a>
+ (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-aliases" title="kmod_config_get_aliases ()">kmod_config_get_aliases</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-options" title="kmod_config_get_options ()">kmod_config_get_options</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-get-softdeps" title="kmod_config_get_softdeps ()">kmod_config_get_softdeps</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()">kmod_config_iter_get_key</a> (<em class="parameter"><code>const <span class="type">struct kmod_config_iter</span> *iter</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()">kmod_config_iter_get_value</a> (<em class="parameter"><code>const <span class="type">struct kmod_config_iter</span> *iter</code></em>);
+<span class="returnvalue">bool</span> <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()">kmod_config_iter_next</a> (<em class="parameter"><code><span class="type">struct kmod_config_iter</span> *iter</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()">kmod_config_iter_free_iter</a> (<em class="parameter"><code><span class="type">struct kmod_config_iter</span> *iter</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-config.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-config.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="kmod-config-iter"></a><h3>struct kmod_config_iter</h3>
+<pre class="programlisting">struct kmod_config_iter;</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-blacklists"></a><h3>kmod_config_get_blacklists ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_blacklists (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the blacklist maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the blacklists or NULL on failure. Free it
+with <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-install-commands"></a><h3>kmod_config_get_install_commands ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_install_commands
+ (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the install commands maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the install commands or NULL on failure. Free
+it with <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-remove-commands"></a><h3>kmod_config_get_remove_commands ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_remove_commands
+ (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the remove commands maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the remove commands or NULL on failure. Free
+it with <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-aliases"></a><h3>kmod_config_get_aliases ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_aliases (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the aliases maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the aliases or NULL on failure. Free it with
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-options"></a><h3>kmod_config_get_options ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_options (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the options maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the options or NULL on failure. Free it with
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-get-softdeps"></a><h3>kmod_config_get_softdeps ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter" title="struct kmod_config_iter"><span class="returnvalue">kmod_config_iter</span></a> * kmod_config_get_softdeps (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve an iterator to deal with the softdeps maintained inside the
+library. See <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-key" title="kmod_config_iter_get_key ()"><code class="function">kmod_config_iter_get_key()</code></a>, <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-get-value" title="kmod_config_iter_get_value ()"><code class="function">kmod_config_iter_get_value()</code></a> and
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a>. At least one call to <a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> must
+be made to initialize the iterator and check if it's valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new iterator over the softdeps or NULL on failure. Free it with
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-free-iter" title="kmod_config_iter_free_iter ()"><code class="function">kmod_config_iter_free_iter()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-iter-get-key"></a><h3>kmod_config_iter_get_key ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_config_iter_get_key (<em class="parameter"><code>const <span class="type">struct kmod_config_iter</span> *iter</code></em>);</pre>
+<p>
+When using a new allocated iterator, user must perform a call to
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> to initialize iterator's position and check if it's
+valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>iterator over a certain configuration</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the key of the current configuration pointed by <em class="parameter"><code>iter</code></em>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-iter-get-value"></a><h3>kmod_config_iter_get_value ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_config_iter_get_value (<em class="parameter"><code>const <span class="type">struct kmod_config_iter</span> *iter</code></em>);</pre>
+<p>
+When using a new allocated iterator, user must perform a call to
+<a class="link" href="libkmod-libkmod-config.html#kmod-config-iter-next" title="kmod_config_iter_next ()"><code class="function">kmod_config_iter_next()</code></a> to initialize iterator's position and check if it's
+valid.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>iterator over a certain configuration</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the value of the current configuration pointed by <em class="parameter"><code>iter</code></em>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-iter-next"></a><h3>kmod_config_iter_next ()</h3>
+<pre class="programlisting"><span class="returnvalue">bool</span> kmod_config_iter_next (<em class="parameter"><code><span class="type">struct kmod_config_iter</span> *iter</code></em>);</pre>
+<p>
+Make <em class="parameter"><code>iter</code></em> point to the next item of a certain configuration. It's an
+automatically recycling iterator. When it reaches the end, false is
+returned; then if user wants to iterate again, it's sufficient to call this
+function once more.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>iterator over a certain configuration</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>true if next position of <em class="parameter"><code>iter</code></em> is valid or false if its end is
+reached.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-config-iter-free-iter"></a><h3>kmod_config_iter_free_iter ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_config_iter_free_iter (<em class="parameter"><code><span class="type">struct kmod_config_iter</span> *iter</code></em>);</pre>
+<p>
+Free resources used by the iterator.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
+<td>iterator over a certain configuration</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/libkmod-libkmod-list.html b/libkmod/docs/html/libkmod-libkmod-list.html
new file mode 100644
index 0000000..483ac4f
--- /dev/null
+++ b/libkmod/docs/html/libkmod-libkmod-list.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod-list</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="ch01.html" title="libkmod">
+<link rel="prev" href="libkmod-libkmod.html" title="libkmod">
+<link rel="next" href="libkmod-libkmod-config.html" title="libkmod-config">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libkmod-libkmod.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="libkmod-libkmod-config.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libkmod-libkmod-list.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libkmod-libkmod-list.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libkmod-libkmod-list"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libkmod-libkmod-list.top_of_page"></a>libkmod-list</span></h2>
+<p>libkmod-list — general purpose list</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libkmod-libkmod-list.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list">kmod_list</a>;
+#define <a class="link" href="libkmod-libkmod-list.html#kmod-list-foreach" title="kmod_list_foreach()">kmod_list_foreach</a> (list_entry,
+ first_entry)
+#define <a class="link" href="libkmod-libkmod-list.html#kmod-list-foreach-reverse" title="kmod_list_foreach_reverse()">kmod_list_foreach_reverse</a> (list_entry,
+ first_entry)
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-list.html#kmod-list-last" title="kmod_list_last ()">kmod_list_last</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>);
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-list.html#kmod-list-next" title="kmod_list_next ()">kmod_list_next</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *curr</code></em>);
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-list.html#kmod-list-prev" title="kmod_list_prev ()">kmod_list_prev</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *curr</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-list.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-list.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="kmod-list"></a><h3>struct kmod_list</h3>
+<pre class="programlisting">struct kmod_list;</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-list-foreach"></a><h3>kmod_list_foreach()</h3>
+<pre class="programlisting">#define kmod_list_foreach(list_entry, first_entry)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-list-foreach-reverse"></a><h3>kmod_list_foreach_reverse()</h3>
+<pre class="programlisting">#define kmod_list_foreach_reverse(list_entry, first_entry)</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-list-last"></a><h3>kmod_list_last ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_list_last (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Get the last element of the <em class="parameter"><code>list</code></em>. As <em class="parameter"><code>list</code></em> is a circular list,
+this is a cheap operation O(1) with the last element being the
+previous element.
+</p>
+<p>
+If the list has a single element it will return the list itself (as
+expected, and this is what differentiates from <a class="link" href="libkmod-libkmod-list.html#kmod-list-prev" title="kmod_list_prev ()"><code class="function">kmod_list_prev()</code></a>).
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>the head of the list</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>last node at <em class="parameter"><code>list</code></em> or NULL if the list is empty.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-list-next"></a><h3>kmod_list_next ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_list_next (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *curr</code></em>);</pre>
+<p>
+Get the next node in <em class="parameter"><code>list</code></em> relative to <em class="parameter"><code>curr</code></em> as if <em class="parameter"><code>list</code></em> was not a circular
+list. I.e. calling this function in the last node of the list returns
+NULL.. It can be used to iterate a list by checking for NULL return to know
+when all elements were iterated.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>the head of the list</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>curr</code></em> :</span></p></td>
+<td>the current node in the list</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>node next to <em class="parameter"><code>curr</code></em> or NULL if either this node is the last of or
+list is empty.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-list-prev"></a><h3>kmod_list_prev ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_list_prev (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *list</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *curr</code></em>);</pre>
+<p>
+Get the previous node in <em class="parameter"><code>list</code></em> relative to <em class="parameter"><code>curr</code></em> as if <em class="parameter"><code>list</code></em> was not a
+circular list. I.e.: the previous of the head is NULL. It can be used to
+iterate a list by checking for NULL return to know when all elements were
+iterated.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>the head of the list</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>curr</code></em> :</span></p></td>
+<td>the current node in the list</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>node previous to <em class="parameter"><code>curr</code></em> or NULL if either this node is the head of
+the list or the list is empty.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/libkmod-libkmod-loaded.html b/libkmod/docs/html/libkmod-libkmod-loaded.html
new file mode 100644
index 0000000..e258c63
--- /dev/null
+++ b/libkmod/docs/html/libkmod-libkmod-loaded.html
@@ -0,0 +1,236 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod-loaded</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="ch01.html" title="libkmod">
+<link rel="prev" href="libkmod-libkmod-module.html" title="libkmod-module">
+<link rel="next" href="api-index-full.html" title="API Index">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libkmod-libkmod-module.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libkmod-libkmod-loaded.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libkmod-libkmod-loaded.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libkmod-libkmod-loaded"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libkmod-libkmod-loaded.top_of_page"></a>libkmod-loaded</span></h2>
+<p>libkmod-loaded — currently loaded modules</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libkmod-libkmod-loaded.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis"><span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-new-from-loaded" title="kmod_module_new_from_loaded ()">kmod_module_new_from_loaded</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-initstate" title="kmod_module_get_initstate ()">kmod_module_get_initstate</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-initstate-str" title="kmod_module_initstate_str ()">kmod_module_initstate_str</a> (<em class="parameter"><code><span class="type">enum kmod_module_initstate</span> state</code></em>);
+<span class="returnvalue">long</span> <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-size" title="kmod_module_get_size ()">kmod_module_get_size</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-refcnt" title="kmod_module_get_refcnt ()">kmod_module_get_refcnt</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-holders" title="kmod_module_get_holders ()">kmod_module_get_holders</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-loaded.description"></a><h2>Description</h2>
+<p>
+Information about currently loaded modules, as reported by Linux kernel.
+These information are not cached by libkmod and are always read from /sys
+and /proc/modules.
+</p>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-loaded.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="kmod-module-new-from-loaded"></a><h3>kmod_module_new_from_loaded ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_new_from_loaded (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Create a new list of kmod modules with all modules currently loaded in
+kernel. It uses /proc/modules to get the names of loaded modules and to
+create kmod modules by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-name" title="kmod_module_new_from_name ()"><code class="function">kmod_module_new_from_name()</code></a> in each of them.
+They are put in <em class="parameter"><code>list</code></em> in no particular order.
+</p>
+<p>
+The initial refcount is 1, and needs to be decremented to release the
+resources of the kmod_module. The returned <em class="parameter"><code>list</code></em> must be released by
+calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a>. Since libkmod keeps track of all
+kmod_modules created, they are all released upon <em class="parameter"><code>ctx</code></em> destruction too. Do
+not unref <em class="parameter"><code>ctx</code></em> before all the desired operations with the returned list are
+completed.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>where to save the list of loaded modules</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 on error.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-initstate"></a><h3>kmod_module_get_initstate ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_initstate (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get the initstate of this <em class="parameter"><code>mod</code></em>, as returned by Linux Kernel, by reading
+/sys filesystem.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>&lt; 0 on error or module state if module is found in kernel, valid states are
+KMOD_MODULE_BUILTIN: module is builtin;
+KMOD_MODULE_LIVE: module is live in kernel;
+KMOD_MODULE_COMING: module is being loaded;
+KMOD_MODULE_GOING: module is being unloaded.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-initstate-str"></a><h3>kmod_module_initstate_str ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_initstate_str (<em class="parameter"><code><span class="type">enum kmod_module_initstate</span> state</code></em>);</pre>
+<p>
+Translate a initstate to a string.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
+<td>the state as returned by <a class="link" href="libkmod-libkmod-loaded.html#kmod-module-get-initstate" title="kmod_module_get_initstate ()"><code class="function">kmod_module_get_initstate()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the string associated to the <em class="parameter"><code>state</code></em>. This string is statically
+allocated, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-size"></a><h3>kmod_module_get_size ()</h3>
+<pre class="programlisting"><span class="returnvalue">long</span> kmod_module_get_size (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get the size of this kmod module as returned by Linux kernel. If supported,
+the size is read from the coresize attribute in /sys/module. For older
+kernels, this falls back on /proc/modules and searches for the specified
+module to get its size.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the size of this kmod module.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-refcnt"></a><h3>kmod_module_get_refcnt ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_refcnt (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get the ref count of this <em class="parameter"><code>mod</code></em>, as returned by Linux Kernel, by reading
+/sys filesystem.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-holders"></a><h3>kmod_module_get_holders ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_module_get_holders (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get a list of kmod modules that are holding this <em class="parameter"><code>mod</code></em>, as returned by Linux
+Kernel. After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new list of kmod modules on success or NULL on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/libkmod-libkmod-module.html b/libkmod/docs/html/libkmod-libkmod-module.html
new file mode 100644
index 0000000..bff06bf
--- /dev/null
+++ b/libkmod/docs/html/libkmod-libkmod-module.html
@@ -0,0 +1,1353 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod-module</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="ch01.html" title="libkmod">
+<link rel="prev" href="libkmod-libkmod-config.html" title="libkmod-config">
+<link rel="next" href="libkmod-libkmod-loaded.html" title="libkmod-loaded">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libkmod-libkmod-config.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="libkmod-libkmod-loaded.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libkmod-libkmod-module.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libkmod-libkmod-module.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libkmod-libkmod-module"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libkmod-libkmod-module.top_of_page"></a>libkmod-module</span></h2>
+<p>libkmod-module — operate on kernel modules</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libkmod-libkmod-module.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module">kmod_module</a>;
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-lookup" title="kmod_module_new_from_lookup ()">kmod_module_new_from_lookup</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *given_alias</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-name" title="kmod_module_new_from_name ()">kmod_module_new_from_name</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_module</span> **mod</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-path" title="kmod_module_new_from_path ()">kmod_module_new_from_path</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_module</span> **mod</code></em>);
+struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-ref" title="kmod_module_ref ()">kmod_module_ref</a> (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>);
+struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref" title="kmod_module_unref ()">kmod_module_unref</a> (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()">kmod_module_unref_list</a> (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-insert-module" title="kmod_module_insert_module ()">kmod_module_insert_module</a> (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *options</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-probe-insert-module" title="kmod_module_probe_insert_module ()">kmod_module_probe_insert_module</a> (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *extra_options</code></em>,
+ <em class="parameter"><code><span class="type">int</span> (*run_install) (struct kmod_module *m, const char *cmdline, void *data)</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
+ <em class="parameter"><code><span class="type">void</span> (*print_action) (struct kmod_module *m, bool install, const char *options)</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-remove-module" title="kmod_module_remove_module ()">kmod_module_remove_module</a> (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);
+struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-module" title="kmod_module_get_module ()">kmod_module_get_module</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-dependencies" title="kmod_module_get_dependencies ()">kmod_module_get_dependencies</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-softdeps" title="kmod_module_get_softdeps ()">kmod_module_get_softdeps</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **pre</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **post</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-apply-filter" title="kmod_module_apply_filter ()">kmod_module_apply_filter</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">enum kmod_filter</span> filter_type</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *input</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **output</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-filtered-blacklist" title="kmod_module_get_filtered_blacklist ()">kmod_module_get_filtered_blacklist</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *input</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **output</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-install-commands" title="kmod_module_get_install_commands ()">kmod_module_get_install_commands</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-remove-commands" title="kmod_module_get_remove_commands ()">kmod_module_get_remove_commands</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-name" title="kmod_module_get_name ()">kmod_module_get_name</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-options" title="kmod_module_get_options ()">kmod_module_get_options</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-path" title="kmod_module_get_path ()">kmod_module_get_path</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-dependency-symbols" title="kmod_module_get_dependency_symbols ()">kmod_module_get_dependency_symbols</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-bind" title="kmod_module_dependency_symbol_get_bind ()">kmod_module_dependency_symbol_get_bind</a>
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+<span class="returnvalue">uint64_t</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-crc" title="kmod_module_dependency_symbol_get_crc ()">kmod_module_dependency_symbol_get_crc</a>
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-symbol" title="kmod_module_dependency_symbol_get_symbol ()">kmod_module_dependency_symbol_get_symbol</a>
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list" title="kmod_module_dependency_symbols_free_list ()">kmod_module_dependency_symbols_free_list</a>
+ (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-sections" title="kmod_module_get_sections ()">kmod_module_get_sections</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-free-list" title="kmod_module_section_free_list ()">kmod_module_section_free_list</a> (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+unsigned <span class="returnvalue">long</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-address" title="kmod_module_section_get_address ()">kmod_module_section_get_address</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-name" title="kmod_module_section_get_name ()">kmod_module_section_get_name</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-symbols" title="kmod_module_get_symbols ()">kmod_module_get_symbols</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">uint64_t</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-crc" title="kmod_module_symbol_get_crc ()">kmod_module_symbol_get_crc</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-symbol" title="kmod_module_symbol_get_symbol ()">kmod_module_symbol_get_symbol</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-symbols-free-list" title="kmod_module_symbols_free_list ()">kmod_module_symbols_free_list</a> (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-versions" title="kmod_module_get_versions ()">kmod_module_get_versions</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">uint64_t</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-crc" title="kmod_module_version_get_crc ()">kmod_module_version_get_crc</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-symbol" title="kmod_module_version_get_symbol ()">kmod_module_version_get_symbol</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-versions-free-list" title="kmod_module_versions_free_list ()">kmod_module_versions_free_list</a> (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-get-info" title="kmod_module_get_info ()">kmod_module_get_info</a> (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod-module.html#kmod-module-info-free-list" title="kmod_module_info_free_list ()">kmod_module_info_free_list</a> (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-key" title="kmod_module_info_get_key ()">kmod_module_info_get_key</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+const <span class="returnvalue">char</span> * <a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-value" title="kmod_module_info_get_value ()">kmod_module_info_get_value</a> (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-module.description"></a><h2>Description</h2>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod-module.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="kmod-module"></a><h3>struct kmod_module</h3>
+<pre class="programlisting">struct kmod_module;</pre>
+<p>
+Opaque object representing a module.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-new-from-lookup"></a><h3>kmod_module_new_from_lookup ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_new_from_lookup (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *given_alias</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Create a new list of kmod modules using an alias or module name and lookup
+libkmod's configuration files and indexes in order to find the module.
+Once it's found in one of the places, it stops searching and create the
+list of modules that is saved in <em class="parameter"><code>list</code></em>.
+</p>
+<p>
+The search order is: 1. aliases in configuration file; 2. module names in
+modules.dep index; 3. symbol aliases in modules.symbols index; 4. aliases
+in modules.alias index.
+</p>
+<p>
+The initial refcount is 1, and needs to be decremented to release the
+resources of the kmod_module. The returned <em class="parameter"><code>list</code></em> must be released by
+calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a>. Since libkmod keeps track of all
+kmod_modules created, they are all released upon <em class="parameter"><code>ctx</code></em> destruction too. Do
+not unref <em class="parameter"><code>ctx</code></em> before all the desired operations with the returned list are
+completed.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>given_alias</code></em> :</span></p></td>
+<td>alias to look for</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>an empty list where to save the list of modules matching
+<em class="parameter"><code>given_alias</code></em>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise. It fails if any of the lookup
+methods failed, which is basically due to memory allocation fail. If module
+is not found, it still returns 0, but <em class="parameter"><code>list</code></em> is an empty list.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-new-from-name"></a><h3>kmod_module_new_from_name ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_new_from_name (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_module</span> **mod</code></em>);</pre>
+<p>
+Create a new struct kmod_module using the module name. <em class="parameter"><code>name</code></em> can not be an
+alias, file name or anything else; it must be a module name. There's no
+check if the module exists in the system.
+</p>
+<p>
+This function is also used internally by many others that return a new
+struct kmod_module or a new list of modules.
+</p>
+<p>
+The initial refcount is 1, and needs to be decremented to release the
+resources of the kmod_module. Since libkmod keeps track of all
+kmod_modules created, they are all released upon <em class="parameter"><code>ctx</code></em> destruction too. Do
+not unref <em class="parameter"><code>ctx</code></em> before all the desired operations with the returned
+kmod_module are done.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>name of the module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>where to save the created struct kmod_module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise. It fails if name is not a valid
+module name or if memory allocation failed.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-new-from-path"></a><h3>kmod_module_new_from_path ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_new_from_path (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_module</span> **mod</code></em>);</pre>
+<p>
+Create a new struct kmod_module using the module path. <em class="parameter"><code>path</code></em> must be an
+existent file with in the filesystem and must be accessible to libkmod.
+</p>
+<p>
+The initial refcount is 1, and needs to be decremented to release the
+resources of the kmod_module. Since libkmod keeps track of all
+kmod_modules created, they are all released upon <em class="parameter"><code>ctx</code></em> destruction too. Do
+not unref <em class="parameter"><code>ctx</code></em> before all the desired operations with the returned
+kmod_module are done.
+</p>
+<p>
+If <em class="parameter"><code>path</code></em> is relative, it's treated as relative to the current working
+directory. Otherwise, give an absolute path.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
+<td>path where to find the given module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>where to save the created struct kmod_module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise. It fails if file does not exist, if
+it's not a valid file for a kmod_module or if memory allocation failed.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-ref"></a><h3>kmod_module_ref ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * kmod_module_ref (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Take a reference of the kmod module, incrementing its refcount.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the passed <em class="parameter"><code>module</code></em> with its refcount incremented.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-unref"></a><h3>kmod_module_unref ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * kmod_module_unref (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Drop a reference of the kmod module. If the refcount reaches zero, its
+resources are released.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>NULL if <em class="parameter"><code>mod</code></em> is NULL or if the module was released. Otherwise it
+returns the passed <em class="parameter"><code>mod</code></em> with its refcount decremented.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-unref-list"></a><h3>kmod_module_unref_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_unref_list (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Drop a reference of each kmod module in <em class="parameter"><code>list</code></em> and releases the resources
+taken by the list itself.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>list of kmod modules</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-insert-module"></a><h3>kmod_module_insert_module ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_insert_module (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *options</code></em>);</pre>
+<p>
+Insert a module in Linux kernel. It opens the file pointed by <em class="parameter"><code>mod</code></em>,
+mmap'ing it and passing to kernel.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>flags are not passed to Linux Kernel, but instead they dictate the
+behavior of this function, valid flags are
+KMOD_INSERT_FORCE_VERMAGIC: ignore kernel version magic;
+KMOD_INSERT_FORCE_MODVERSION: ignore symbol version hashes.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
+<td>module's options to pass to Linux Kernel.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 on failure. If module is already loaded it
+returns -EEXIST.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-probe-insert-module"></a><h3>kmod_module_probe_insert_module ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_probe_insert_module (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> *extra_options</code></em>,
+ <em class="parameter"><code><span class="type">int</span> (*run_install) (struct kmod_module *m, const char *cmdline, void *data)</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
+ <em class="parameter"><code><span class="type">void</span> (*print_action) (struct kmod_module *m, bool install, const char *options)</code></em>);</pre>
+<p>
+Insert a module in Linux kernel resolving dependencies, soft dependencies,
+install commands and applying blacklist.
+</p>
+<p>
+If <em class="parameter"><code>run_install</code></em> is NULL, this function will fork and exec by calling
+system(3). Don't pass a NULL argument in <em class="parameter"><code>run_install</code></em> if your binary is
+setuid/setgid (see warning in system(3)). If you need control over the
+execution of an install command, give a callback function instead.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>flags are not passed to Linux Kernel, but instead they dictate the
+behavior of this function, valid flags are
+KMOD_PROBE_FORCE_VERMAGIC: ignore kernel version magic;
+KMOD_PROBE_FORCE_MODVERSION: ignore symbol version hashes;
+KMOD_PROBE_IGNORE_COMMAND: whether the probe should ignore install
+commands and softdeps configured in the system;
+KMOD_PROBE_IGNORE_LOADED: do not check whether the module is already
+live in kernel or not;
+KMOD_PROBE_DRY_RUN: dry run, do not insert module, just call the
+associated callback function;
+KMOD_PROBE_FAIL_ON_LOADED: if KMOD_PROBE_IGNORE_LOADED is not specified
+and the module is already live in kernel, the function will fail if this
+flag is specified;
+KMOD_PROBE_APPLY_BLACKLIST_ALL: probe will apply KMOD_FILTER_BLACKLIST
+filter to this module and its dependencies. If any of the dependencies (or
+the module) is blacklisted, the probe will fail, unless the blacklisted
+module is already live in kernel;
+KMOD_PROBE_APPLY_BLACKLIST: probe will fail if the module is blacklisted;
+KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY: probe will fail if the module is an
+alias and is blacklisted.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>extra_options</code></em> :</span></p></td>
+<td>module's options to pass to Linux Kernel. It applies only
+to <em class="parameter"><code>mod</code></em>, not to its dependencies.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>run_install</code></em> :</span></p></td>
+<td>function to run when <em class="parameter"><code>mod</code></em> is backed by an install command.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
+<td>data to give back to <em class="parameter"><code>run_install</code></em> callback</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>print_action</code></em> :</span></p></td>
+<td>function to call with the action being taken (install or
+insmod). It's useful for tools like modprobe when running with verbose
+output or in dry-run mode.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success, &gt; 0 if stopped by a reason given in <em class="parameter"><code>flags</code></em> or &lt; 0 on
+failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-remove-module"></a><h3>kmod_module_remove_module ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_remove_module (<em class="parameter"><code><span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre>
+<p>
+Remove a module from Linux kernel.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
+<td>flags to pass to Linux kernel when removing the module, valid flags are
+KMOD_REMOVE_FORCE: force remove module regardless if it's still in
+use by a kernel subsystem or other process;
+KMOD_REMOVE_NOWAIT: return immediately. It will fail if the module
+is in using and KMOD_REMOVE_FORCE is not specified.
+If this module is in use by any kernel subsystem or process, not using
+this flag will cause the call to block indefinitely, until the module
+is not in use anymore. Always use this flag, it's deprecated not using
+it and the default behavior might change in future to always set it.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-module"></a><h3>kmod_module_get_module ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-module.html#kmod-module" title="struct kmod_module"><span class="returnvalue">kmod_module</span></a> * kmod_module_get_module (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the kmod module of this <em class="parameter"><code>entry</code></em> in the list, increasing its refcount.
+After it's used, unref it. Since the refcount is incremented upon return,
+you still have to call <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a> to release the list of kmod
+modules.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>an entry in a list of kmod modules.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>NULL on failure or the kmod_module contained in this list entry
+with its refcount incremented.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-dependencies"></a><h3>kmod_module_get_dependencies ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_module_get_dependencies (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Search the modules.dep index to find the dependencies of the given <em class="parameter"><code>mod</code></em>.
+The result is cached in <em class="parameter"><code>mod</code></em>, so subsequent calls to this function will
+return the already searched list of modules.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>NULL on failure. Otherwise it returns a list of kmod modules
+that can be released by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a>.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-softdeps"></a><h3>kmod_module_get_softdeps ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_softdeps (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **pre</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **post</code></em>);</pre>
+<p>
+Get soft dependencies for this kmod module. Soft dependencies come
+from configuration file and are not cached in <em class="parameter"><code>mod</code></em> because it may include
+dependency cycles that would make we leak kmod_module. Any call
+to this function will search for this module in configuration, allocate a
+list and return the result.
+</p>
+<p>
+Both <em class="parameter"><code>pre</code></em> and <em class="parameter"><code>post</code></em> are newly created list of kmod_module and
+should be unreferenced with <a class="link" href="libkmod-libkmod-module.html#kmod-module-unref-list" title="kmod_module_unref_list ()"><code class="function">kmod_module_unref_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pre</code></em> :</span></p></td>
+<td>where to save the list of preceding soft dependencies.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>post</code></em> :</span></p></td>
+<td>where to save the list of post soft dependencies.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-apply-filter"></a><h3>kmod_module_apply_filter ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_apply_filter (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">enum kmod_filter</span> filter_type</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *input</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **output</code></em>);</pre>
+<p>
+Given a list <em class="parameter"><code>input</code></em>, this function filter it out by the filter mask
+and save it in <em class="parameter"><code>output</code></em>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filter_type</code></em> :</span></p></td>
+<td>bitmask to filter modules out, valid types are
+KMOD_FILTER_BLACKLIST: filter modules in blacklist out;
+KMOD_FILTER_BUILTIN: filter builtin modules out.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
+<td>list of kmod_module to be filtered</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
+<td>where to save the new list</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise. <em class="parameter"><code>output</code></em> is saved with the updated
+list.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-filtered-blacklist"></a><h3>kmod_module_get_filtered_blacklist ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_filtered_blacklist (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">struct kmod_list</span> *input</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **output</code></em>);</pre>
+<p>
+This function should not be used. Use kmod_module_apply_filter instead.
+</p>
+<p>
+Given a list <em class="parameter"><code>input</code></em>, this function filter it out with config's blacklist
+and save it in <em class="parameter"><code>output</code></em>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
+<td>list of kmod_module to be filtered with blacklist</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
+<td>where to save the new list</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise. <em class="parameter"><code>output</code></em> is saved with the updated
+list.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-install-commands"></a><h3>kmod_module_get_install_commands ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_get_install_commands (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get install commands for this kmod module. Install commands come from the
+configuration file and are cached in <em class="parameter"><code>mod</code></em>. The first call to this function
+will search for this module in configuration and subsequent calls return
+the cached string. The install commands are returned as they were in the
+configuration, concatenated by ';'. No other processing is made in this
+string.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a string with all install commands separated by semicolons. This
+string is owned by <em class="parameter"><code>mod</code></em>, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-remove-commands"></a><h3>kmod_module_get_remove_commands ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_get_remove_commands (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get remove commands for this kmod module. Remove commands come from the
+configuration file and are cached in <em class="parameter"><code>mod</code></em>. The first call to this function
+will search for this module in configuration and subsequent calls return
+the cached string. The remove commands are returned as they were in the
+configuration, concatenated by ';'. No other processing is made in this
+string.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a string with all remove commands separated by semicolons. This
+string is owned by <em class="parameter"><code>mod</code></em>, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-name"></a><h3>kmod_module_get_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_get_name (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get the name of this kmod module. Name is always available, independently
+if it was created by <a class="link" href="libkmod-libkmod-module.html#kmod-module-new-from-name" title="kmod_module_new_from_name ()"><code class="function">kmod_module_new_from_name()</code></a> or another function and
+it's always normalized (dashes are replaced with underscores).
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the name of this kmod module.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-options"></a><h3>kmod_module_get_options ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_get_options (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get options of this kmod module. Options come from the configuration file
+and are cached in <em class="parameter"><code>mod</code></em>. The first call to this function will search for
+this module in configuration and subsequent calls return the cached string.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a string with all the options separated by spaces. This string is
+owned by <em class="parameter"><code>mod</code></em>, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-path"></a><h3>kmod_module_get_path ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_get_path (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get the path of this kmod module. If this kmod module was not created by
+path, it can search the modules.dep index in order to find out the module
+under context's dirname.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the path of this kmod module or NULL if such information is not
+available.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-dependency-symbols"></a><h3>kmod_module_get_dependency_symbols ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_dependency_symbols (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list" title="kmod_module_dependency_symbols_free_list ()"><code class="function">kmod_module_dependency_symbols_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>where to return list of module dependency_symbols. Use
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-symbol" title="kmod_module_dependency_symbol_get_symbol ()"><code class="function">kmod_module_dependency_symbol_get_symbol()</code></a> and
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-crc" title="kmod_module_dependency_symbol_get_crc ()"><code class="function">kmod_module_dependency_symbol_get_crc()</code></a>. Release this list with
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list" title="kmod_module_dependency_symbols_free_list ()"><code class="function">kmod_module_dependency_symbols_free_list()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-dependency-symbol-get-bind"></a><h3>kmod_module_dependency_symbol_get_bind ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_dependency_symbol_get_bind
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the bind type of a kmod module dependency_symbol.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module dependency_symbol</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the bind of this kmod module dependency_symbol on success
+or &lt; 0 on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-dependency-symbol-get-crc"></a><h3>kmod_module_dependency_symbol_get_crc ()</h3>
+<pre class="programlisting"><span class="returnvalue">uint64_t</span> kmod_module_dependency_symbol_get_crc
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the crc of a kmod module dependency_symbol.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module dependency_symbol</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the crc of this kmod module dependency_symbol on success or NULL on
+failure. The string is owned by the dependency_symbol, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-dependency-symbol-get-symbol"></a><h3>kmod_module_dependency_symbol_get_symbol ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_dependency_symbol_get_symbol
+ (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the dependency symbol of a kmod module
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module dependency_symbols</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol of this kmod module dependency_symbols on success or NULL
+on failure. The string is owned by the dependency_symbols, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-dependency-symbols-free-list"></a><h3>kmod_module_dependency_symbols_free_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_module_dependency_symbols_free_list
+ (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Release the resources taken by <em class="parameter"><code>list</code></em>
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>kmod module dependency_symbols list</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-sections"></a><h3>kmod_module_get_sections ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod-list.html#kmod-list" title="struct kmod_list"><span class="returnvalue">kmod_list</span></a> * kmod_module_get_sections (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>);</pre>
+<p>
+Get a list of kmod sections of this <em class="parameter"><code>mod</code></em>, as returned by Linux Kernel. The
+structure contained in this list is internal to libkmod and their fields
+can be obtained by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-name" title="kmod_module_section_get_name ()"><code class="function">kmod_module_section_get_name()</code></a> and
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-section-get-address" title="kmod_module_section_get_address ()"><code class="function">kmod_module_section_get_address()</code></a>.
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-free-list" title="kmod_module_section_free_list ()"><code class="function">kmod_module_section_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new list of kmod module sections on success or NULL on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-section-free-list"></a><h3>kmod_module_section_free_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_module_section_free_list (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Release the resources taken by <em class="parameter"><code>list</code></em>
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>kmod module section list</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-section-get-address"></a><h3>kmod_module_section_get_address ()</h3>
+<pre class="programlisting">unsigned <span class="returnvalue">long</span> kmod_module_section_get_address (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the address of a kmod module section.
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-section-free-list" title="kmod_module_section_free_list ()"><code class="function">kmod_module_section_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module section</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the address of this kmod module section on success or ULONG_MAX
+on failure.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-section-get-name"></a><h3>kmod_module_section_get_name ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_section_get_name (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-symbols"></a><h3>kmod_module_get_symbols ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_symbols (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-symbols-free-list" title="kmod_module_symbols_free_list ()"><code class="function">kmod_module_symbols_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>where to return list of module symbols. Use
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-symbol" title="kmod_module_symbol_get_symbol ()"><code class="function">kmod_module_symbol_get_symbol()</code></a> and
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbol-get-crc" title="kmod_module_symbol_get_crc ()"><code class="function">kmod_module_symbol_get_crc()</code></a>. Release this list with
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-symbols-free-list" title="kmod_module_symbols_free_list ()"><code class="function">kmod_module_symbols_free_list()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-symbol-get-crc"></a><h3>kmod_module_symbol_get_crc ()</h3>
+<pre class="programlisting"><span class="returnvalue">uint64_t</span> kmod_module_symbol_get_crc (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the crc of a kmod module symbol.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module symbol</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the crc of this kmod module symbol on success or NULL on
+failure. The string is owned by the symbol, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-symbol-get-symbol"></a><h3>kmod_module_symbol_get_symbol ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_symbol_get_symbol (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the symbol of a kmod module symbols.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module symbols</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol of this kmod module symbols on success or NULL
+on failure. The string is owned by the symbols, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-symbols-free-list"></a><h3>kmod_module_symbols_free_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_module_symbols_free_list (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Release the resources taken by <em class="parameter"><code>list</code></em>
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>kmod module symbols list</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-versions"></a><h3>kmod_module_get_versions ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_versions (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Get a list of entries in ELF section "__versions".
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-versions-free-list" title="kmod_module_versions_free_list ()"><code class="function">kmod_module_versions_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>where to return list of module versions. Use
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-symbol" title="kmod_module_version_get_symbol ()"><code class="function">kmod_module_version_get_symbol()</code></a> and
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-version-get-crc" title="kmod_module_version_get_crc ()"><code class="function">kmod_module_version_get_crc()</code></a>. Release this list with
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-versions-free-list" title="kmod_module_versions_free_list ()"><code class="function">kmod_module_versions_free_list()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-version-get-crc"></a><h3>kmod_module_version_get_crc ()</h3>
+<pre class="programlisting"><span class="returnvalue">uint64_t</span> kmod_module_version_get_crc (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the crc of a kmod module version.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module version</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the crc of this kmod module version on success or NULL on
+failure. The string is owned by the version, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-version-get-symbol"></a><h3>kmod_module_version_get_symbol ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_version_get_symbol (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the symbol of a kmod module versions.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module versions</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the symbol of this kmod module versions on success or NULL
+on failure. The string is owned by the versions, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-versions-free-list"></a><h3>kmod_module_versions_free_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_module_versions_free_list (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Release the resources taken by <em class="parameter"><code>list</code></em>
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>kmod module versions list</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-get-info"></a><h3>kmod_module_get_info ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_module_get_info (<em class="parameter"><code>const <span class="type">struct kmod_module</span> *mod</code></em>,
+ <em class="parameter"><code><span class="type">struct kmod_list</span> **list</code></em>);</pre>
+<p>
+Get a list of entries in ELF section ".modinfo", these contain
+alias, license, depends, vermagic and other keys with respective
+values. If the module is signed (CONFIG_MODULE_SIG), information
+about the module signature is included as well: signer,
+sig_key and sig_hashalgo.
+</p>
+<p>
+After use, free the <em class="parameter"><code>list</code></em> by calling <a class="link" href="libkmod-libkmod-module.html#kmod-module-info-free-list" title="kmod_module_info_free_list ()"><code class="function">kmod_module_info_free_list()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mod</code></em> :</span></p></td>
+<td>kmod module</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>where to return list of module information. Use
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-key" title="kmod_module_info_get_key ()"><code class="function">kmod_module_info_get_key()</code></a> and
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-get-value" title="kmod_module_info_get_value ()"><code class="function">kmod_module_info_get_value()</code></a>. Release this list with
+<a class="link" href="libkmod-libkmod-module.html#kmod-module-info-free-list" title="kmod_module_info_free_list ()"><code class="function">kmod_module_info_free_list()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-info-free-list"></a><h3>kmod_module_info_free_list ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_module_info_free_list (<em class="parameter"><code><span class="type">struct kmod_list</span> *list</code></em>);</pre>
+<p>
+Release the resources taken by <em class="parameter"><code>list</code></em>
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
+<td>kmod module info list</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-info-get-key"></a><h3>kmod_module_info_get_key ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_info_get_key (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the key of a kmod module info.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module info</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the key of this kmod module info on success or NULL on
+failure. The string is owned by the info, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-module-info-get-value"></a><h3>kmod_module_info_get_value ()</h3>
+<pre class="programlisting">const <span class="returnvalue">char</span> * kmod_module_info_get_value (<em class="parameter"><code>const <span class="type">struct kmod_list</span> *entry</code></em>);</pre>
+<p>
+Get the value of a kmod module info.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
+<td>a list entry representing a kmod module info</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the value of this kmod module info on success or NULL on
+failure. The string is owned by the info, do not free it.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/libkmod-libkmod.html b/libkmod/docs/html/libkmod-libkmod.html
new file mode 100644
index 0000000..22b804b
--- /dev/null
+++ b/libkmod/docs/html/libkmod-libkmod.html
@@ -0,0 +1,436 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>libkmod</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
+<link rel="home" href="index.html" title="libkmod Reference Manual">
+<link rel="up" href="ch01.html" title="libkmod">
+<link rel="prev" href="ch01.html" title="libkmod">
+<link rel="next" href="libkmod-libkmod-list.html" title="libkmod-list">
+<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libkmod Reference Manual</th>
+<td><a accesskey="n" href="libkmod-libkmod-list.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libkmod-libkmod.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libkmod-libkmod.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libkmod-libkmod"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libkmod-libkmod.top_of_page"></a>libkmod</span></h2>
+<p>libkmod — libkmod context</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libkmod-libkmod.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx">kmod_ctx</a>;
+struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * <a class="link" href="libkmod-libkmod.html#kmod-new" title="kmod_new ()">kmod_new</a> (<em class="parameter"><code>const <span class="type">char</span> *dirname</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> * const *config_paths</code></em>);
+struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * <a class="link" href="libkmod-libkmod.html#kmod-ref" title="kmod_ref ()">kmod_ref</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);
+struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * <a class="link" href="libkmod-libkmod.html#kmod-unref" title="kmod_unref ()">kmod_unref</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod.html#kmod-load-resources" title="kmod_load_resources ()">kmod_load_resources</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod.html#kmod-unload-resources" title="kmod_unload_resources ()">kmod_unload_resources</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod.html#kmod-validate-resources" title="kmod_validate_resources ()">kmod_validate_resources</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod.html#kmod-dump-index" title="kmod_dump_index ()">kmod_dump_index</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">enum kmod_index</span> type</code></em>,
+ <em class="parameter"><code><span class="type">int</span> fd</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod.html#kmod-set-log-priority" title="kmod_set_log_priority ()">kmod_set_log_priority</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">int</span> priority</code></em>);
+<span class="returnvalue">int</span> <a class="link" href="libkmod-libkmod.html#kmod-get-log-priority" title="kmod_get_log_priority ()">kmod_get_log_priority</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod.html#kmod-set-log-fn" title="kmod_set_log_fn ()">kmod_set_log_fn</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">void</span> (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args)</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *data</code></em>);
+<span class="returnvalue">void</span> * <a class="link" href="libkmod-libkmod.html#kmod-get-userdata" title="kmod_get_userdata ()">kmod_get_userdata</a> (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="libkmod-libkmod.html#kmod-set-userdata" title="kmod_set_userdata ()">kmod_set_userdata</a> (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *userdata</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod.description"></a><h2>Description</h2>
+<p>
+The context contains the default values for the library user,
+and is passed to all library operations.
+</p>
+</div>
+<div class="refsect1">
+<a name="libkmod-libkmod.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="kmod-ctx"></a><h3>struct kmod_ctx</h3>
+<pre class="programlisting">struct kmod_ctx;</pre>
+<p>
+Opaque object representing the library context.
+</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-new"></a><h3>kmod_new ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * kmod_new (<em class="parameter"><code>const <span class="type">char</span> *dirname</code></em>,
+ <em class="parameter"><code>const <span class="type">char</span> * const *config_paths</code></em>);</pre>
+<p>
+Create kmod library context. This reads the kmod configuration
+and fills in the default values.
+</p>
+<p>
+The initial refcount is 1, and needs to be decremented to
+release the resources of the kmod library context.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
+<td>what to consider as linux module's directory, if NULL
+defaults to /lib/modules/`uname -r`. If it's relative,
+it's treated as relative to the current working directory.
+Otherwise, give an absolute dirname.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>config_paths</code></em> :</span></p></td>
+<td>ordered array of paths (directories or files) where
+to load from user-defined configuration parameters such as
+alias, blacklists, commands (install, remove). If
+NULL defaults to /run/modprobe.d, /etc/modprobe.d and
+/lib/modprobe.d. Give an empty vector if configuration should
+not be read. This array must be null terminated.</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>a new kmod library context</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-ref"></a><h3>kmod_ref ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * kmod_ref (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Take a reference of the kmod library context.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the passed kmod library context</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-unref"></a><h3>kmod_unref ()</h3>
+<pre class="programlisting">struct <a class="link" href="libkmod-libkmod.html#kmod-ctx" title="struct kmod_ctx"><span class="returnvalue">kmod_ctx</span></a> * kmod_unref (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Drop a reference of the kmod library context. If the refcount
+reaches zero, the resources of the context will be released.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the passed kmod library context or NULL if it's freed</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-load-resources"></a><h3>kmod_load_resources ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_load_resources (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Load indexes and keep them open in <em class="parameter"><code>ctx</code></em>. This way it's faster to lookup
+information within the indexes. If this function is not called before a
+search, the necessary index is always opened and closed.
+</p>
+<p>
+If user will do more than one or two lookups, insertions, deletions, most
+likely it's good to call this function first. Particularly in a daemon like
+udev that on bootup issues hundreds of calls to lookup the index, calling
+this function will speedup the searches.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-unload-resources"></a><h3>kmod_unload_resources ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_unload_resources (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Unload all the indexes. This will free the resources to maintain the index
+open and all subsequent searches will need to open and close the index.
+</p>
+<p>
+User is free to call <a class="link" href="libkmod-libkmod.html#kmod-load-resources" title="kmod_load_resources ()"><code class="function">kmod_load_resources()</code></a> and <a class="link" href="libkmod-libkmod.html#kmod-unload-resources" title="kmod_unload_resources ()"><code class="function">kmod_unload_resources()</code></a> as
+many times as wanted during the lifecycle of <em class="parameter"><code>ctx</code></em>. For example, if a daemon
+knows that when starting up it will lookup a lot of modules, it could call
+<a class="link" href="libkmod-libkmod.html#kmod-load-resources" title="kmod_load_resources ()"><code class="function">kmod_load_resources()</code></a> and after the first burst of searches is gone, it
+could free the resources by calling <a class="link" href="libkmod-libkmod.html#kmod-unload-resources" title="kmod_unload_resources ()"><code class="function">kmod_unload_resources()</code></a>.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-validate-resources"></a><h3>kmod_validate_resources ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_validate_resources (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Check if indexes and configuration files changed on disk and the current
+context is not valid anymore.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>KMOD_RESOURCES_OK if resources are still valid,
+KMOD_RESOURCES_MUST_RELOAD if it's sufficient to call
+<a class="link" href="libkmod-libkmod.html#kmod-unload-resources" title="kmod_unload_resources ()"><code class="function">kmod_unload_resources()</code></a> and <a class="link" href="libkmod-libkmod.html#kmod-load-resources" title="kmod_load_resources ()"><code class="function">kmod_load_resources()</code></a> or
+KMOD_RESOURCES_MUST_RECREATE if <em class="parameter"><code>ctx</code></em> must be re-created.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-dump-index"></a><h3>kmod_dump_index ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_dump_index (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">enum kmod_index</span> type</code></em>,
+ <em class="parameter"><code><span class="type">int</span> fd</code></em>);</pre>
+<p>
+Dump index to file descriptor. Note that this function doesn't use stdio.h
+so call <code class="function">fflush()</code> before calling this function to be sure data is written in
+order.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
+<td>index to dump, valid indexes are
+KMOD_INDEX_MODULES_DEP: index of module dependencies;
+KMOD_INDEX_MODULES_ALIAS: index of module aliases;
+KMOD_INDEX_MODULES_SYMBOL: index of symbol aliases;
+KMOD_INDEX_MODULES_BUILTIN: index of builtin module.</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
+<td>file descriptor to dump index to</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>0 on success or &lt; 0 otherwise.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-set-log-priority"></a><h3>kmod_set_log_priority ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_set_log_priority (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">int</span> priority</code></em>);</pre>
+<p>
+Set the current logging priority. The value controls which messages
+are logged.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
+<td>the new logging priority</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-get-log-priority"></a><h3>kmod_get_log_priority ()</h3>
+<pre class="programlisting"><span class="returnvalue">int</span> kmod_get_log_priority (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>the current logging priority</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-set-log-fn"></a><h3>kmod_set_log_fn ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_set_log_fn (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code><span class="type">void</span> (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args)</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *data</code></em>);</pre>
+<p>
+The built-in logging writes to stderr. It can be
+overridden by a custom function, to plug log messages
+into the user's logging functionality.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>log_fn</code></em> :</span></p></td>
+<td>function to be called for logging messages</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
+<td>data to pass to log function</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-get-userdata"></a><h3>kmod_get_userdata ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> * kmod_get_userdata (<em class="parameter"><code>const <span class="type">struct kmod_ctx</span> *ctx</code></em>);</pre>
+<p>
+Retrieve stored data pointer from library context. This might be useful
+to access from callbacks.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>stored userdata</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="kmod-set-userdata"></a><h3>kmod_set_userdata ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> kmod_set_userdata (<em class="parameter"><code><span class="type">struct kmod_ctx</span> *ctx</code></em>,
+ <em class="parameter"><code>const <span class="type">void</span> *userdata</code></em>);</pre>
+<p>
+Store custom <em class="parameter"><code>userdata</code></em> in the library context.
+</p>
+<div class="variablelist"><table border="0" class="variablelist">
+<colgroup>
+<col align="left" valign="top">
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
+<td>kmod library context</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>userdata</code></em> :</span></p></td>
+<td>data pointer</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.19</div>
+</body>
+</html> \ No newline at end of file
diff --git a/libkmod/docs/html/libkmod.devhelp2 b/libkmod/docs/html/libkmod.devhelp2
new file mode 100644
index 0000000..b2dca73
--- /dev/null
+++ b/libkmod/docs/html/libkmod.devhelp2
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="libkmod Reference Manual" link="index.html" author="" name="libkmod" version="2" language="c">
+ <chapters>
+ <sub name="libkmod" link="ch01.html">
+ <sub name="libkmod" link="libkmod-libkmod.html"/>
+ <sub name="libkmod-list" link="libkmod-libkmod-list.html"/>
+ <sub name="libkmod-config" link="libkmod-libkmod-config.html"/>
+ <sub name="libkmod-module" link="libkmod-libkmod-module.html"/>
+ <sub name="libkmod-loaded" link="libkmod-libkmod-loaded.html"/>
+ </sub>
+ <sub name="API Index" link="api-index-full.html"/>
+ </chapters>
+ <functions>
+ <keyword type="struct" name="struct kmod_ctx" link="libkmod-libkmod.html#kmod-ctx"/>
+ <keyword type="function" name="kmod_new ()" link="libkmod-libkmod.html#kmod-new"/>
+ <keyword type="function" name="kmod_ref ()" link="libkmod-libkmod.html#kmod-ref"/>
+ <keyword type="function" name="kmod_unref ()" link="libkmod-libkmod.html#kmod-unref"/>
+ <keyword type="function" name="kmod_load_resources ()" link="libkmod-libkmod.html#kmod-load-resources"/>
+ <keyword type="function" name="kmod_unload_resources ()" link="libkmod-libkmod.html#kmod-unload-resources"/>
+ <keyword type="function" name="kmod_validate_resources ()" link="libkmod-libkmod.html#kmod-validate-resources"/>
+ <keyword type="function" name="kmod_dump_index ()" link="libkmod-libkmod.html#kmod-dump-index"/>
+ <keyword type="function" name="kmod_set_log_priority ()" link="libkmod-libkmod.html#kmod-set-log-priority"/>
+ <keyword type="function" name="kmod_get_log_priority ()" link="libkmod-libkmod.html#kmod-get-log-priority"/>
+ <keyword type="function" name="kmod_set_log_fn ()" link="libkmod-libkmod.html#kmod-set-log-fn"/>
+ <keyword type="function" name="kmod_get_userdata ()" link="libkmod-libkmod.html#kmod-get-userdata"/>
+ <keyword type="function" name="kmod_set_userdata ()" link="libkmod-libkmod.html#kmod-set-userdata"/>
+ <keyword type="struct" name="struct kmod_list" link="libkmod-libkmod-list.html#kmod-list"/>
+ <keyword type="macro" name="kmod_list_foreach()" link="libkmod-libkmod-list.html#kmod-list-foreach"/>
+ <keyword type="macro" name="kmod_list_foreach_reverse()" link="libkmod-libkmod-list.html#kmod-list-foreach-reverse"/>
+ <keyword type="function" name="kmod_list_last ()" link="libkmod-libkmod-list.html#kmod-list-last"/>
+ <keyword type="function" name="kmod_list_next ()" link="libkmod-libkmod-list.html#kmod-list-next"/>
+ <keyword type="function" name="kmod_list_prev ()" link="libkmod-libkmod-list.html#kmod-list-prev"/>
+ <keyword type="struct" name="struct kmod_config_iter" link="libkmod-libkmod-config.html#kmod-config-iter"/>
+ <keyword type="function" name="kmod_config_get_blacklists ()" link="libkmod-libkmod-config.html#kmod-config-get-blacklists"/>
+ <keyword type="function" name="kmod_config_get_install_commands ()" link="libkmod-libkmod-config.html#kmod-config-get-install-commands"/>
+ <keyword type="function" name="kmod_config_get_remove_commands ()" link="libkmod-libkmod-config.html#kmod-config-get-remove-commands"/>
+ <keyword type="function" name="kmod_config_get_aliases ()" link="libkmod-libkmod-config.html#kmod-config-get-aliases"/>
+ <keyword type="function" name="kmod_config_get_options ()" link="libkmod-libkmod-config.html#kmod-config-get-options"/>
+ <keyword type="function" name="kmod_config_get_softdeps ()" link="libkmod-libkmod-config.html#kmod-config-get-softdeps"/>
+ <keyword type="function" name="kmod_config_iter_get_key ()" link="libkmod-libkmod-config.html#kmod-config-iter-get-key"/>
+ <keyword type="function" name="kmod_config_iter_get_value ()" link="libkmod-libkmod-config.html#kmod-config-iter-get-value"/>
+ <keyword type="function" name="kmod_config_iter_next ()" link="libkmod-libkmod-config.html#kmod-config-iter-next"/>
+ <keyword type="function" name="kmod_config_iter_free_iter ()" link="libkmod-libkmod-config.html#kmod-config-iter-free-iter"/>
+ <keyword type="struct" name="struct kmod_module" link="libkmod-libkmod-module.html#kmod-module"/>
+ <keyword type="function" name="kmod_module_new_from_lookup ()" link="libkmod-libkmod-module.html#kmod-module-new-from-lookup"/>
+ <keyword type="function" name="kmod_module_new_from_name ()" link="libkmod-libkmod-module.html#kmod-module-new-from-name"/>
+ <keyword type="function" name="kmod_module_new_from_path ()" link="libkmod-libkmod-module.html#kmod-module-new-from-path"/>
+ <keyword type="function" name="kmod_module_ref ()" link="libkmod-libkmod-module.html#kmod-module-ref"/>
+ <keyword type="function" name="kmod_module_unref ()" link="libkmod-libkmod-module.html#kmod-module-unref"/>
+ <keyword type="function" name="kmod_module_unref_list ()" link="libkmod-libkmod-module.html#kmod-module-unref-list"/>
+ <keyword type="function" name="kmod_module_insert_module ()" link="libkmod-libkmod-module.html#kmod-module-insert-module"/>
+ <keyword type="function" name="kmod_module_probe_insert_module ()" link="libkmod-libkmod-module.html#kmod-module-probe-insert-module"/>
+ <keyword type="function" name="kmod_module_remove_module ()" link="libkmod-libkmod-module.html#kmod-module-remove-module"/>
+ <keyword type="function" name="kmod_module_get_module ()" link="libkmod-libkmod-module.html#kmod-module-get-module"/>
+ <keyword type="function" name="kmod_module_get_dependencies ()" link="libkmod-libkmod-module.html#kmod-module-get-dependencies"/>
+ <keyword type="function" name="kmod_module_get_softdeps ()" link="libkmod-libkmod-module.html#kmod-module-get-softdeps"/>
+ <keyword type="function" name="kmod_module_apply_filter ()" link="libkmod-libkmod-module.html#kmod-module-apply-filter"/>
+ <keyword type="function" name="kmod_module_get_filtered_blacklist ()" link="libkmod-libkmod-module.html#kmod-module-get-filtered-blacklist"/>
+ <keyword type="function" name="kmod_module_get_install_commands ()" link="libkmod-libkmod-module.html#kmod-module-get-install-commands"/>
+ <keyword type="function" name="kmod_module_get_remove_commands ()" link="libkmod-libkmod-module.html#kmod-module-get-remove-commands"/>
+ <keyword type="function" name="kmod_module_get_name ()" link="libkmod-libkmod-module.html#kmod-module-get-name"/>
+ <keyword type="function" name="kmod_module_get_options ()" link="libkmod-libkmod-module.html#kmod-module-get-options"/>
+ <keyword type="function" name="kmod_module_get_path ()" link="libkmod-libkmod-module.html#kmod-module-get-path"/>
+ <keyword type="function" name="kmod_module_get_dependency_symbols ()" link="libkmod-libkmod-module.html#kmod-module-get-dependency-symbols"/>
+ <keyword type="function" name="kmod_module_dependency_symbol_get_bind ()" link="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-bind"/>
+ <keyword type="function" name="kmod_module_dependency_symbol_get_crc ()" link="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-crc"/>
+ <keyword type="function" name="kmod_module_dependency_symbol_get_symbol ()" link="libkmod-libkmod-module.html#kmod-module-dependency-symbol-get-symbol"/>
+ <keyword type="function" name="kmod_module_dependency_symbols_free_list ()" link="libkmod-libkmod-module.html#kmod-module-dependency-symbols-free-list"/>
+ <keyword type="function" name="kmod_module_get_sections ()" link="libkmod-libkmod-module.html#kmod-module-get-sections"/>
+ <keyword type="function" name="kmod_module_section_free_list ()" link="libkmod-libkmod-module.html#kmod-module-section-free-list"/>
+ <keyword type="function" name="kmod_module_section_get_address ()" link="libkmod-libkmod-module.html#kmod-module-section-get-address"/>
+ <keyword type="function" name="kmod_module_section_get_name ()" link="libkmod-libkmod-module.html#kmod-module-section-get-name"/>
+ <keyword type="function" name="kmod_module_get_symbols ()" link="libkmod-libkmod-module.html#kmod-module-get-symbols"/>
+ <keyword type="function" name="kmod_module_symbol_get_crc ()" link="libkmod-libkmod-module.html#kmod-module-symbol-get-crc"/>
+ <keyword type="function" name="kmod_module_symbol_get_symbol ()" link="libkmod-libkmod-module.html#kmod-module-symbol-get-symbol"/>
+ <keyword type="function" name="kmod_module_symbols_free_list ()" link="libkmod-libkmod-module.html#kmod-module-symbols-free-list"/>
+ <keyword type="function" name="kmod_module_get_versions ()" link="libkmod-libkmod-module.html#kmod-module-get-versions"/>
+ <keyword type="function" name="kmod_module_version_get_crc ()" link="libkmod-libkmod-module.html#kmod-module-version-get-crc"/>
+ <keyword type="function" name="kmod_module_version_get_symbol ()" link="libkmod-libkmod-module.html#kmod-module-version-get-symbol"/>
+ <keyword type="function" name="kmod_module_versions_free_list ()" link="libkmod-libkmod-module.html#kmod-module-versions-free-list"/>
+ <keyword type="function" name="kmod_module_get_info ()" link="libkmod-libkmod-module.html#kmod-module-get-info"/>
+ <keyword type="function" name="kmod_module_info_free_list ()" link="libkmod-libkmod-module.html#kmod-module-info-free-list"/>
+ <keyword type="function" name="kmod_module_info_get_key ()" link="libkmod-libkmod-module.html#kmod-module-info-get-key"/>
+ <keyword type="function" name="kmod_module_info_get_value ()" link="libkmod-libkmod-module.html#kmod-module-info-get-value"/>
+ <keyword type="function" name="kmod_module_new_from_loaded ()" link="libkmod-libkmod-loaded.html#kmod-module-new-from-loaded"/>
+ <keyword type="function" name="kmod_module_get_initstate ()" link="libkmod-libkmod-loaded.html#kmod-module-get-initstate"/>
+ <keyword type="function" name="kmod_module_initstate_str ()" link="libkmod-libkmod-loaded.html#kmod-module-initstate-str"/>
+ <keyword type="function" name="kmod_module_get_size ()" link="libkmod-libkmod-loaded.html#kmod-module-get-size"/>
+ <keyword type="function" name="kmod_module_get_refcnt ()" link="libkmod-libkmod-loaded.html#kmod-module-get-refcnt"/>
+ <keyword type="function" name="kmod_module_get_holders ()" link="libkmod-libkmod-loaded.html#kmod-module-get-holders"/>
+ </functions>
+</book>
diff --git a/libkmod/docs/html/right.png b/libkmod/docs/html/right.png
new file mode 100644
index 0000000..92832e3
--- /dev/null
+++ b/libkmod/docs/html/right.png
Binary files differ
diff --git a/libkmod/docs/html/style.css b/libkmod/docs/html/style.css
new file mode 100644
index 0000000..d6f6c26
--- /dev/null
+++ b/libkmod/docs/html/style.css
@@ -0,0 +1,266 @@
+.synopsis, .classsynopsis
+{
+ /* tango:aluminium 1/2 */
+ background: #eeeeec;
+ border: solid 1px #d3d7cf;
+ padding: 0.5em;
+}
+.programlisting
+{
+ /* tango:sky blue 0/1 */
+ background: #e6f3ff;
+ border: solid 1px #729fcf;
+ padding: 0.5em;
+}
+.variablelist
+{
+ padding: 4px;
+ margin-left: 3em;
+}
+.variablelist td:first-child
+{
+ vertical-align: top;
+}
+
+@media screen {
+ sup a.footnote
+ {
+ position: relative;
+ top: 0em ! important;
+
+ }
+ /* this is needed so that the local anchors are displayed below the naviagtion */
+ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name]
+ {
+ display: inline-block;
+ position: relative;
+ top:-5em;
+ }
+ /* this seems to be a bug in the xsl style sheets when generating indexes */
+ div.index div.index
+ {
+ top: 0em;
+ }
+ /* make space for the fixed navigation bar and add space at the bottom so that
+ * link targets appear somewhat close to top
+ */
+ body
+ {
+ padding-top: 3.2em;
+ padding-bottom: 20em;
+ }
+ /* style and size the navigation bar */
+ table.navigation#top
+ {
+ position: fixed;
+ /* tango:scarlet red 0/1 */
+ background: #ffe6e6;
+ border: solid 1px #ef2929;
+ margin-top: 0;
+ margin-bottom: 0;
+ top: 0;
+ left: 0;
+ height: 3em;
+ z-index: 10;
+ }
+ .navigation a, .navigation a:visited
+ {
+ /* tango:scarlet red 3 */
+ color: #a40000;
+ }
+ .navigation a:hover
+ {
+ /* tango:scarlet red 1 */
+ color: #ef2929;
+ }
+ td.shortcuts
+ {
+ /* tango:scarlet red 1 */
+ color: #ef2929;
+ font-size: 80%;
+ white-space: nowrap;
+ }
+}
+@media print {
+ table.navigation {
+ visibility: collapse;
+ display: none;
+ }
+ div.titlepage table.navigation {
+ visibility: visible;
+ display: table;
+ /* tango:scarlet red 0/1 */
+ background: #ffe6e6;
+ border: solid 1px #ef2929;
+ margin-top: 0;
+ margin-bottom: 0;
+ top: 0;
+ left: 0;
+ height: 3em;
+ }
+}
+
+.navigation .title
+{
+ font-size: 200%;
+}
+
+div.gallery-float
+{
+ float: left;
+ padding: 10px;
+}
+div.gallery-float img
+{
+ border-style: none;
+}
+div.gallery-spacer
+{
+ clear: both;
+}
+
+a, a:visited
+{
+ text-decoration: none;
+ /* tango:sky blue 2 */
+ color: #3465a4;
+}
+a:hover
+{
+ text-decoration: underline;
+ /* tango:sky blue 1 */
+ color: #729fcf;
+}
+
+div.table table
+{
+ border-collapse: collapse;
+ border-spacing: 0px;
+ /* tango:aluminium 3 */
+ border: solid 1px #babdb6;
+}
+
+div.table table td, div.table table th
+{
+ /* tango:aluminium 3 */
+ border: solid 1px #babdb6;
+ padding: 3px;
+ vertical-align: top;
+}
+
+div.table table th
+{
+ /* tango:aluminium 2 */
+ background-color: #d3d7cf;
+}
+
+hr
+{
+ /* tango:aluminium 3 */
+ color: #babdb6;
+ background: #babdb6;
+ border: none 0px;
+ height: 1px;
+ clear: both;
+}
+
+.footer
+{
+ padding-top: 3.5em;
+ /* tango:aluminium 3 */
+ color: #babdb6;
+ text-align: center;
+ font-size: 80%;
+}
+
+.warning
+{
+ /* tango:orange 0/1 */
+ background: #ffeed9;
+ border-color: #ffb04f;
+}
+.note
+{
+ /* tango:chameleon 0/0.5 */
+ background: #d8ffb2;
+ border-color: #abf562;
+}
+.note, .warning
+{
+ padding: 0.5em;
+ border-width: 1px;
+ border-style: solid;
+}
+.note h3, .warning h3
+{
+ margin-top: 0.0em
+}
+.note p, .warning p
+{
+ margin-bottom: 0.0em
+}
+
+/* blob links */
+h2 .extralinks, h3 .extralinks
+{
+ float: right;
+ /* tango:aluminium 3 */
+ color: #babdb6;
+ font-size: 80%;
+ font-weight: normal;
+}
+
+.annotation
+{
+ /* tango:aluminium 5 */
+ color: #555753;
+ font-size: 80%;
+ font-weight: normal;
+}
+
+/* code listings */
+
+.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */
+.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */
+.listing_code .programlisting .function { color: #000000; font-weight: bold; }
+.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
+.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */
+.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */
+.listing_code .programlisting .normal { color: #000000; }
+.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */
+.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */
+.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */
+.listing_code .programlisting .type { color: #000000; }
+.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */
+.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */
+
+.listing_frame {
+ /* tango:sky blue 1 */
+ border: solid 1px #729fcf;
+ padding: 0px;
+}
+
+.listing_lines, .listing_code {
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0.5em;
+}
+.listing_lines {
+ /* tango:sky blue 0.5 */
+ background: #a6c5e3;
+ /* tango:aluminium 6 */
+ color: #2e3436;
+}
+.listing_code {
+ /* tango:sky blue 0 */
+ background: #e6f3ff;
+}
+.listing_code .programlisting {
+ /* override from previous */
+ border: none 0px;
+ padding: 0px;
+}
+.listing_lines pre, .listing_code pre {
+ margin: 0px;
+}
+
diff --git a/libkmod/docs/html/up.png b/libkmod/docs/html/up.png
new file mode 100644
index 0000000..85b3e2a
--- /dev/null
+++ b/libkmod/docs/html/up.png
Binary files differ
diff --git a/libkmod/docs/libkmod-overrides.txt b/libkmod/docs/libkmod-overrides.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libkmod/docs/libkmod-overrides.txt
diff --git a/libkmod/docs/version.xml b/libkmod/docs/version.xml
new file mode 100644
index 0000000..60d3b2f
--- /dev/null
+++ b/libkmod/docs/version.xml
@@ -0,0 +1 @@
+15
diff --git a/libkmod/libkmod-array.c b/libkmod/libkmod-array.c
index f9ca5cf..8417f9a 100644
--- a/libkmod/libkmod-array.c
+++ b/libkmod/libkmod-array.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 398468e..24978c1 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,7 @@
#include <dirent.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
struct kmod_alias {
char *name;
@@ -518,7 +518,7 @@ static void kmod_config_free_softdep(struct kmod_config *config,
static void kcmdline_parse_result(struct kmod_config *config, char *modname,
char *param, char *value)
{
- if (modname == NULL || param == NULL || value == NULL)
+ if (modname == NULL || param == NULL)
return;
DBG(config->ctx, "%s %s\n", modname, param);
@@ -833,7 +833,7 @@ static int conf_files_list(struct kmod_ctx *ctx, struct kmod_list **list,
if (S_ISREG(st.st_mode)) {
conf_files_insert_sorted(ctx, list, path, NULL);
return 0;
- } if (!S_ISDIR(st.st_mode)) {
+ } else if (!S_ISDIR(st.st_mode)) {
ERR(ctx, "unsupported file mode %s: %#x\n",
path, st.st_mode);
return -EINVAL;
diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c
index ef6bd2a..1c11a24 100644
--- a/libkmod/libkmod-elf.c
+++ b/libkmod/libkmod-elf.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,7 @@
#include <errno.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
enum kmod_elf_class {
KMOD_ELF_32 = (1 << 1),
@@ -280,10 +280,10 @@ struct kmod_elf *kmod_elf_new(const void *memory, off_t size)
size_t hdr_size, shdr_size, min_size;
int class;
- assert(sizeof(uint16_t) == sizeof(Elf32_Half));
- assert(sizeof(uint16_t) == sizeof(Elf64_Half));
- assert(sizeof(uint32_t) == sizeof(Elf32_Word));
- assert(sizeof(uint32_t) == sizeof(Elf64_Word));
+ assert_cc(sizeof(uint16_t) == sizeof(Elf32_Half));
+ assert_cc(sizeof(uint16_t) == sizeof(Elf64_Half));
+ assert_cc(sizeof(uint32_t) == sizeof(Elf32_Word));
+ assert_cc(sizeof(uint32_t) == sizeof(Elf64_Word));
class = elf_identify(memory, size);
if (class < 0) {
@@ -513,7 +513,7 @@ int kmod_elf_get_modversions(const struct kmod_elf *elf, struct kmod_modversion
int i, count, err;
#define MODVERSION_SEC_SIZE (sizeof(struct kmod_modversion64))
- assert(sizeof(struct kmod_modversion64) ==
+ assert_cc(sizeof(struct kmod_modversion64) ==
sizeof(struct kmod_modversion32));
if (elf->class == KMOD_ELF_32)
diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c
index 679edef..390f018 100644
--- a/libkmod/libkmod-file.c
+++ b/libkmod/libkmod-file.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
#include <unistd.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
#ifdef ENABLE_XZ
#include <lzma.h>
@@ -52,6 +52,7 @@ struct kmod_file {
gzFile gzf;
#endif
int fd;
+ bool direct;
off_t size;
void *memory;
const struct file_ops *ops;
@@ -254,9 +255,11 @@ static int load_reg(struct kmod_file *file)
return -errno;
file->size = st.st_size;
- file->memory = mmap(0, file->size, PROT_READ, MAP_PRIVATE, file->fd, 0);
+ file->memory = mmap(NULL, file->size, PROT_READ, MAP_PRIVATE,
+ file->fd, 0);
if (file->memory == MAP_FAILED)
return -errno;
+ file->direct = true;
return 0;
}
@@ -300,6 +303,7 @@ struct kmod_file *kmod_file_open(const struct kmod_ctx *ctx,
magic_size_max = itr->magic_size;
}
+ file->direct = false;
if (magic_size_max > 0) {
char *buf = alloca(magic_size_max + 1);
ssize_t sz;
@@ -353,6 +357,16 @@ off_t kmod_file_get_size(const struct kmod_file *file)
return file->size;
}
+bool kmod_file_get_direct(const struct kmod_file *file)
+{
+ return file->direct;
+}
+
+int kmod_file_get_fd(const struct kmod_file *file)
+{
+ return file->fd;
+}
+
void kmod_file_unref(struct kmod_file *file)
{
if (file->elf)
diff --git a/libkmod/libkmod-hash.c b/libkmod/libkmod-hash.c
index dc9910b..57f475c 100644
--- a/libkmod/libkmod-hash.c
+++ b/libkmod/libkmod-hash.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c
index a5933e2..fa7db41 100644
--- a/libkmod/libkmod-index.c
+++ b/libkmod/libkmod-index.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -27,7 +27,7 @@
#include <assert.h>
#include <inttypes.h>
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
#include "libkmod-index.h"
#include "macro.h"
@@ -432,9 +432,12 @@ void index_dump(struct index_file *in, int fd, const char *prefix)
struct index_node_f *root;
struct buffer buf;
+ root = index_readroot(in);
+ if (root == NULL)
+ return;
+
buf_init(&buf);
buf_pushchars(&buf, prefix);
- root = index_readroot(in);
index_dump_node(root, &buf, fd);
buf_release(&buf);
}
@@ -801,9 +804,9 @@ struct index_mm *index_mm_open(struct kmod_ctx *ctx, const char *filename,
if ((size_t) st.st_size < sizeof(hdr))
goto fail_nommap;
- if ((idx->mm = mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0))
+ if ((idx->mm = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0))
== MAP_FAILED) {
- ERR(ctx, "mmap(0, %"PRIu64", PROT_READ, %d, MAP_PRIVATE, 0): %m\n",
+ ERR(ctx, "mmap(NULL, %"PRIu64", PROT_READ, %d, MAP_PRIVATE, 0): %m\n",
st.st_size, fd);
goto fail_nommap;
}
@@ -902,9 +905,12 @@ void index_mm_dump(struct index_mm *idx, int fd, const char *prefix)
struct index_mm_node *root;
struct buffer buf;
+ root = index_mm_readroot(idx);
+ if (root == NULL)
+ return;
+
buf_init(&buf);
buf_pushchars(&buf, prefix);
- root = index_mm_readroot(idx);
index_mm_dump_node(root, &buf, fd);
buf_release(&buf);
}
diff --git a/libkmod/libkmod-index.h b/libkmod/libkmod-index.h
index 6eb77b9..ad63e15 100644
--- a/libkmod/libkmod-index.h
+++ b/libkmod/libkmod-index.h
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/libkmod/libkmod-private.h b/libkmod/libkmod-internal.h
index 4760733..0180124 100644
--- a/libkmod/libkmod-private.h
+++ b/libkmod/libkmod-internal.h
@@ -5,6 +5,7 @@
#include <syslog.h>
#include <limits.h>
+#include "missing.h"
#include "macro.h"
#include "libkmod.h"
@@ -35,6 +36,15 @@ static _always_inline_ _printf_format_(2, 3) void
#define KCMD_LINE_SIZE 4096
+#ifndef HAVE_SECURE_GETENV
+# ifdef HAVE___SECURE_GETENV
+# define secure_getenv __secure_getenv
+# else
+# warning neither secure_getenv nor __secure_getenv is available
+# define secure_getenv getenv
+# endif
+#endif
+
void kmod_log(const struct kmod_ctx *ctx,
int priority, const char *file, int line, const char *fn,
const char *format, ...) __attribute__((format(printf, 6, 7))) __attribute__((nonnull(1, 3, 5)));
@@ -87,8 +97,8 @@ void kmod_set_modules_visited(struct kmod_ctx *ctx, bool visited) __attribute__(
char *kmod_search_moddep(struct kmod_ctx *ctx, const char *name) __attribute__((nonnull(1,2)));
struct kmod_module *kmod_pool_get_module(struct kmod_ctx *ctx, const char *key) __attribute__((nonnull(1,2)));
-void kmod_pool_add_module(struct kmod_ctx *ctx, struct kmod_module *mod, const char *key) __attribute__((nonnull(1,2, 3)));
-void kmod_pool_del_module(struct kmod_ctx *ctx, struct kmod_module *mod, const char *key) __attribute__((nonnull(1,2, 3)));
+void kmod_pool_add_module(struct kmod_ctx *ctx, struct kmod_module *mod, const char *key) __attribute__((nonnull(1, 2, 3)));
+void kmod_pool_del_module(struct kmod_ctx *ctx, struct kmod_module *mod, const char *key) __attribute__((nonnull(1, 2, 3)));
const struct kmod_config *kmod_get_config(const struct kmod_ctx *ctx) __attribute__((nonnull(1)));
@@ -142,6 +152,8 @@ struct kmod_file *kmod_file_open(const struct kmod_ctx *ctx, const char *filenam
struct kmod_elf *kmod_file_get_elf(struct kmod_file *file) __attribute__((nonnull(1)));
void *kmod_file_get_contents(const struct kmod_file *file) _must_check_ __attribute__((nonnull(1)));
off_t kmod_file_get_size(const struct kmod_file *file) _must_check_ __attribute__((nonnull(1)));
+bool kmod_file_get_direct(const struct kmod_file *file) _must_check_ __attribute__((nonnull(1)));
+int kmod_file_get_fd(const struct kmod_file *file) _must_check_ __attribute__((nonnull(1)));
void kmod_file_unref(struct kmod_file *file) __attribute__((nonnull(1)));
/* libkmod-elf.c */
@@ -168,5 +180,14 @@ int kmod_elf_strip_vermagic(struct kmod_elf *elf) _must_check_ __attribute__((no
*/
int kmod_elf_get_section(const struct kmod_elf *elf, const char *section, const void **buf, uint64_t *buf_size) _must_check_ __attribute__((nonnull(1,2,3,4)));
+/* libkmod-signature.c */
+struct kmod_signature_info {
+ const char *signer;
+ size_t signer_len;
+ const char *key_id;
+ size_t key_id_len;
+ const char *algo, *hash_algo, *id_type;
+};
+bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signature_info *sig_info) _must_check_ __attribute__((nonnull(1, 2)));
/* util functions */
#include "libkmod-util.h"
diff --git a/libkmod/libkmod-list.c b/libkmod/libkmod-list.c
index 982c4ab..45f512a 100644
--- a/libkmod/libkmod-list.c
+++ b/libkmod/libkmod-list.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
/**
* SECTION:libkmod-list
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index 0d87ce1..0fc1101 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -33,12 +33,17 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/syscall.h>
#include <sys/wait.h>
#include <string.h>
#include <fnmatch.h>
+#ifdef HAVE_LINUX_MODULE_H
+#include <linux/module.h>
+#endif
+
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
/**
* SECTION:libkmod-module
@@ -565,8 +570,7 @@ fail:
* Drop a reference of each kmod module in @list and releases the resources
* taken by the list itself.
*
- * Returns: NULL if @mod is NULL or if the module was released. Otherwise it
- * returns the passed @mod with its refcount decremented.
+ * Returns: 0
*/
KMOD_EXPORT int kmod_module_unref_list(struct kmod_list *list)
{
@@ -624,9 +628,8 @@ static const struct kmod_list *module_get_dependencies_noref(const struct kmod_m
* The result is cached in @mod, so subsequent calls to this function will
* return the already searched list of modules.
*
- * Returns: NULL on failure or if there are any dependencies. Otherwise it
- * returns a list of kmod modules that can be released by calling
- * kmod_module_unref_list().
+ * Returns: NULL on failure. Otherwise it returns a list of kmod modules
+ * that can be released by calling kmod_module_unref_list().
*/
KMOD_EXPORT struct kmod_list *kmod_module_get_dependencies(const struct kmod_module *mod)
{
@@ -735,7 +738,15 @@ extern long delete_module(const char *name, unsigned int flags);
/**
* kmod_module_remove_module:
* @mod: kmod module
- * @flags: flags to pass to Linux kernel when removing the module
+ * @flags: flags to pass to Linux kernel when removing the module, valid flags are
+ * KMOD_REMOVE_FORCE: force remove module regardless if it's still in
+ * use by a kernel subsystem or other process;
+ * KMOD_REMOVE_NOWAIT: return immediately. It will fail if the module
+ * is in using and KMOD_REMOVE_FORCE is not specified.
+ * If this module is in use by any kernel subsystem or process, not using
+ * this flag will cause the call to block indefinitely, until the module
+ * is not in use anymore. Always use this flag, it's deprecated not using
+ * it and the default behavior might change in future to always set it.
*
* Remove a module from Linux kernel.
*
@@ -767,7 +778,9 @@ extern long init_module(const void *mem, unsigned long len, const char *args);
* kmod_module_insert_module:
* @mod: kmod module
* @flags: flags are not passed to Linux Kernel, but instead they dictate the
- * behavior of this function.
+ * behavior of this function, valid flags are
+ * KMOD_INSERT_FORCE_VERMAGIC: ignore kernel version magic;
+ * KMOD_INSERT_FORCE_MODVERSION: ignore symbol version hashes.
* @options: module's options to pass to Linux Kernel.
*
* Insert a module in Linux kernel. It opens the file pointed by @mod,
@@ -803,6 +816,19 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
return err;
}
+ if (kmod_file_get_direct(file)) {
+ unsigned int kernel_flags = 0;
+
+ if (flags & KMOD_INSERT_FORCE_VERMAGIC)
+ kernel_flags |= MODULE_INIT_IGNORE_VERMAGIC;
+ if (flags & KMOD_INSERT_FORCE_MODVERSION)
+ kernel_flags |= MODULE_INIT_IGNORE_MODVERSIONS;
+
+ err = finit_module(kmod_file_get_fd(file), args, kernel_flags);
+ if (err == 0 || errno != ENOSYS)
+ goto init_finished;
+ }
+
size = kmod_file_get_size(file);
mem = kmod_file_get_contents(file);
@@ -829,6 +855,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
}
err = init_module(mem, size, args);
+init_finished:
if (err < 0) {
err = -errno;
INFO(mod->ctx, "Failed to insert module '%s': %m\n", path);
@@ -862,7 +889,9 @@ static bool module_is_blacklisted(struct kmod_module *mod)
/**
* kmod_module_apply_filter
* @ctx: kmod library context
- * @filter_type: bitmask to filter modules on
+ * @filter_type: bitmask to filter modules out, valid types are
+ * KMOD_FILTER_BLACKLIST: filter modules in blacklist out;
+ * KMOD_FILTER_BUILTIN: filter builtin modules out.
* @input: list of kmod_module to be filtered
* @output: where to save the new list
*
@@ -1133,7 +1162,25 @@ static int kmod_module_get_probe_list(struct kmod_module *mod,
* kmod_module_probe_insert_module:
* @mod: kmod module
* @flags: flags are not passed to Linux Kernel, but instead they dictate the
- * behavior of this function.
+ * behavior of this function, valid flags are
+ * KMOD_PROBE_FORCE_VERMAGIC: ignore kernel version magic;
+ * KMOD_PROBE_FORCE_MODVERSION: ignore symbol version hashes;
+ * KMOD_PROBE_IGNORE_COMMAND: whether the probe should ignore install
+ * commands and softdeps configured in the system;
+ * KMOD_PROBE_IGNORE_LOADED: do not check whether the module is already
+ * live in kernel or not;
+ * KMOD_PROBE_DRY_RUN: dry run, do not insert module, just call the
+ * associated callback function;
+ * KMOD_PROBE_FAIL_ON_LOADED: if KMOD_PROBE_IGNORE_LOADED is not specified
+ * and the module is already live in kernel, the function will fail if this
+ * flag is specified;
+ * KMOD_PROBE_APPLY_BLACKLIST_ALL: probe will apply KMOD_FILTER_BLACKLIST
+ * filter to this module and its dependencies. If any of the dependencies (or
+ * the module) is blacklisted, the probe will fail, unless the blacklisted
+ * module is already live in kernel;
+ * KMOD_PROBE_APPLY_BLACKLIST: probe will fail if the module is blacklisted;
+ * KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY: probe will fail if the module is an
+ * alias and is blacklisted.
* @extra_options: module's options to pass to Linux Kernel. It applies only
* to @mod, not to its dependencies.
* @run_install: function to run when @mod is backed by an install command.
@@ -1545,7 +1592,7 @@ void kmod_module_set_remove_commands(struct kmod_module *mod, const char *cmd)
* Create a new list of kmod modules with all modules currently loaded in
* kernel. It uses /proc/modules to get the names of loaded modules and to
* create kmod modules by calling kmod_module_new_from_name() in each of them.
- * They are put are put in @list in no particular order.
+ * They are put in @list in no particular order.
*
* The initial refcount is 1, and needs to be decremented to release the
* resources of the kmod_module. The returned @list must be released by
@@ -1633,7 +1680,11 @@ KMOD_EXPORT const char *kmod_module_initstate_str(enum kmod_module_initstate sta
* Get the initstate of this @mod, as returned by Linux Kernel, by reading
* /sys filesystem.
*
- * Returns: < 0 on error or enum kmod_initstate if module is found in kernel.
+ * Returns: < 0 on error or module state if module is found in kernel, valid states are
+ * KMOD_MODULE_BUILTIN: module is builtin;
+ * KMOD_MODULE_LIVE: module is live in kernel;
+ * KMOD_MODULE_COMING: module is being loaded;
+ * KMOD_MODULE_GOING: module is being unloaded.
*/
KMOD_EXPORT int kmod_module_get_initstate(const struct kmod_module *mod)
{
@@ -1820,7 +1871,7 @@ KMOD_EXPORT struct kmod_list *kmod_module_get_holders(const struct kmod_module *
struct kmod_list *list = NULL;
DIR *d;
- if (mod == NULL)
+ if (mod == NULL || mod->ctx == NULL)
return NULL;
snprintf(dname, sizeof(dname), "/sys/module/%s/holders", mod->name);
@@ -2081,7 +2132,7 @@ static struct kmod_module_info *kmod_module_info_new(const char *key, size_t key
return NULL;
info->key = (char *)info + sizeof(struct kmod_module_info)
- + valuelen + 1;
+ + valuelen + 1;
memcpy(info->key, key, keylen);
info->key[keylen] = '\0';
memcpy(info->value, value, valuelen);
@@ -2094,6 +2145,22 @@ static void kmod_module_info_free(struct kmod_module_info *info)
free(info);
}
+static struct kmod_list *kmod_module_info_append(struct kmod_list **list, const char *key, size_t keylen, const char *value, size_t valuelen)
+{
+ struct kmod_module_info *info;
+ struct kmod_list *n;
+
+ info = kmod_module_info_new(key, keylen, value, valuelen);
+ if (info == NULL)
+ return NULL;
+ n = kmod_list_append(*list, info);
+ if (n != NULL)
+ *list = n;
+ else
+ kmod_module_info_free(info);
+ return n;
+}
+
/**
* kmod_module_get_info:
* @mod: kmod module
@@ -2104,7 +2171,9 @@ static void kmod_module_info_free(struct kmod_module_info *info)
*
* Get a list of entries in ELF section ".modinfo", these contain
* alias, license, depends, vermagic and other keys with respective
- * values.
+ * values. If the module is signed (CONFIG_MODULE_SIG), information
+ * about the module signature is included as well: signer,
+ * sig_key and sig_hashalgo.
*
* After use, free the @list by calling kmod_module_info_free_list().
*
@@ -2114,7 +2183,8 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
{
struct kmod_elf *elf;
char **strings;
- int i, count, ret = 0;
+ int i, count, ret = -ENOMEM;
+ struct kmod_signature_info sig_info;
if (mod == NULL || list == NULL)
return -ENOENT;
@@ -2130,7 +2200,6 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
return count;
for (i = 0; i < count; i++) {
- struct kmod_module_info *info;
struct kmod_list *n;
const char *key, *value;
size_t keylen, valuelen;
@@ -2140,34 +2209,64 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
if (value == NULL) {
keylen = strlen(key);
valuelen = 0;
+ value = key;
} else {
keylen = value - key;
value++;
valuelen = strlen(value);
}
- info = kmod_module_info_new(key, keylen, value, valuelen);
- if (info == NULL) {
- ret = -errno;
- kmod_module_info_free_list(*list);
- *list = NULL;
+ n = kmod_module_info_append(list, key, keylen, value, valuelen);
+ if (n == NULL)
goto list_error;
- }
+ }
- n = kmod_list_append(*list, info);
- if (n != NULL)
- *list = n;
- else {
- kmod_module_info_free(info);
- kmod_module_info_free_list(*list);
- *list = NULL;
- ret = -ENOMEM;
+ if (kmod_module_signature_info(mod->file, &sig_info)) {
+ struct kmod_list *n;
+ char *key_hex;
+
+ n = kmod_module_info_append(list, "signer", strlen("signer"),
+ sig_info.signer, sig_info.signer_len);
+ if (n == NULL)
goto list_error;
+ count++;
+
+ /* Display the key id as 01:12:DE:AD:BE:EF:... */
+ key_hex = malloc(sig_info.key_id_len * 3);
+ if (key_hex == NULL)
+ goto list_error;
+ for (i = 0; i < (int)sig_info.key_id_len; i++) {
+ sprintf(key_hex + i * 3, "%02X",
+ (unsigned char)sig_info.key_id[i]);
+ if (i < (int)sig_info.key_id_len - 1)
+ key_hex[i * 3 + 2] = ':';
}
+ n = kmod_module_info_append(list, "sig_key", strlen("sig_key"),
+ key_hex, sig_info.key_id_len * 3 - 1);
+ free(key_hex);
+ if (n == NULL)
+ goto list_error;
+ count++;
+
+ n = kmod_module_info_append(list,
+ "sig_hashalgo", strlen("sig_hashalgo"),
+ sig_info.hash_algo, strlen(sig_info.hash_algo));
+ if (n == NULL)
+ goto list_error;
+ count++;
+
+ /*
+ * Omit sig_info.id_type and sig_info.algo for now, as these
+ * are currently constant.
+ */
}
ret = count;
list_error:
+ if (ret < 0) {
+ kmod_module_info_free_list(*list);
+ *list = NULL;
+ }
free(strings);
return ret;
}
@@ -2314,7 +2413,7 @@ list_error:
}
/**
- * kmod_module_versions_get_symbol:
+ * kmod_module_version_get_symbol:
* @entry: a list entry representing a kmod module versions
*
* Get the symbol of a kmod module versions.
diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
new file mode 100644
index 0000000..6237ab7
--- /dev/null
+++ b/libkmod/libkmod-signature.c
@@ -0,0 +1,141 @@
+/*
+ * libkmod - module signature display
+ *
+ * Copyright (C) 2013 Michal Marek, SUSE
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <endian.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "libkmod-internal.h"
+
+/* These types and tables were copied from the 3.7 kernel sources.
+ * As this is just description of the signature format, it should not be
+ * considered derived work (so libkmod can use the LGPL license).
+ */
+enum pkey_algo {
+ PKEY_ALGO_DSA,
+ PKEY_ALGO_RSA,
+ PKEY_ALGO__LAST
+};
+
+static const char *const pkey_algo[PKEY_ALGO__LAST] = {
+ [PKEY_ALGO_DSA] = "DSA",
+ [PKEY_ALGO_RSA] = "RSA",
+};
+
+enum pkey_hash_algo {
+ PKEY_HASH_MD4,
+ PKEY_HASH_MD5,
+ PKEY_HASH_SHA1,
+ PKEY_HASH_RIPE_MD_160,
+ PKEY_HASH_SHA256,
+ PKEY_HASH_SHA384,
+ PKEY_HASH_SHA512,
+ PKEY_HASH_SHA224,
+ PKEY_HASH__LAST
+};
+
+const char *const pkey_hash_algo[PKEY_HASH__LAST] = {
+ [PKEY_HASH_MD4] = "md4",
+ [PKEY_HASH_MD5] = "md5",
+ [PKEY_HASH_SHA1] = "sha1",
+ [PKEY_HASH_RIPE_MD_160] = "rmd160",
+ [PKEY_HASH_SHA256] = "sha256",
+ [PKEY_HASH_SHA384] = "sha384",
+ [PKEY_HASH_SHA512] = "sha512",
+ [PKEY_HASH_SHA224] = "sha224",
+};
+
+enum pkey_id_type {
+ PKEY_ID_PGP, /* OpenPGP generated key ID */
+ PKEY_ID_X509, /* X.509 arbitrary subjectKeyIdentifier */
+ PKEY_ID_TYPE__LAST
+};
+
+const char *const pkey_id_type[PKEY_ID_TYPE__LAST] = {
+ [PKEY_ID_PGP] = "PGP",
+ [PKEY_ID_X509] = "X509",
+};
+
+/*
+ * Module signature information block.
+ *
+ * The constituents of the signature section are, in order:
+ *
+ * - Signer's name
+ * - Key identifier
+ * - Signature data
+ * - Information block
+ */
+struct module_signature {
+ uint8_t algo; /* Public-key crypto algorithm [enum pkey_algo] */
+ uint8_t hash; /* Digest algorithm [enum pkey_hash_algo] */
+ uint8_t id_type; /* Key identifier type [enum pkey_id_type] */
+ uint8_t signer_len; /* Length of signer's name */
+ uint8_t key_id_len; /* Length of key identifier */
+ uint8_t __pad[3];
+ uint32_t sig_len; /* Length of signature data (big endian) */
+};
+
+#define SIG_MAGIC "~Module signature appended~\n"
+
+bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signature_info *sig_info)
+{
+ const char *mem;
+ off_t size;
+ const struct module_signature *modsig;
+ size_t sig_len;
+
+
+ size = kmod_file_get_size(file);
+ mem = kmod_file_get_contents(file);
+ if (size < (off_t)strlen(SIG_MAGIC))
+ return false;
+ size -= strlen(SIG_MAGIC);
+ if (memcmp(SIG_MAGIC, mem + size, strlen(SIG_MAGIC)) != 0)
+ return false;
+
+ if (size < (off_t)sizeof(struct module_signature))
+ return false;
+ size -= sizeof(struct module_signature);
+ modsig = (struct module_signature *)(mem + size);
+ if (modsig->algo >= PKEY_ALGO__LAST ||
+ modsig->hash >= PKEY_HASH__LAST ||
+ modsig->id_type >= PKEY_ID_TYPE__LAST)
+ return false;
+ sig_len = be32toh(modsig->sig_len);
+ if (size < (off_t)(modsig->signer_len + modsig->key_id_len + sig_len))
+ return false;
+
+ size -= modsig->key_id_len + sig_len;
+ sig_info->key_id = mem + size;
+ sig_info->key_id_len = modsig->key_id_len;
+
+ size -= modsig->signer_len;
+ sig_info->signer = mem + size;
+ sig_info->signer_len = modsig->signer_len;
+
+ sig_info->algo = pkey_algo[modsig->algo];
+ sig_info->hash_algo = pkey_hash_algo[modsig->hash];
+ sig_info->id_type = pkey_id_type[modsig->id_type];
+
+ return true;
+}
diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c
index 71bf51d..d686250 100644
--- a/libkmod/libkmod-util.c
+++ b/libkmod/libkmod-util.c
@@ -1,7 +1,9 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
+ * Copyright (C) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
+ * Copyright (C) 2013 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +31,7 @@
#include <ctype.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
/*
* Read one logical line from a configuration file.
@@ -308,6 +310,77 @@ char *path_make_absolute_cwd(const char *p)
return r;
}
+static inline int is_dir(const char *path)
+{
+ struct stat st;
+
+ if (stat(path, &st) >= 0)
+ return S_ISDIR(st.st_mode);
+
+ return -errno;
+}
+
+int mkdir_p(const char *path, int len, mode_t mode)
+{
+ char *start, *end;
+
+ start = strndupa(path, len);
+ end = start + len;
+
+ /*
+ * scan backwards, replacing '/' with '\0' while the component doesn't
+ * exist
+ */
+ for (;;) {
+ int r = is_dir(start);
+ if (r > 0) {
+ end += strlen(end);
+
+ if (end == start + len)
+ return 0;
+
+ /* end != start, since it would be caught on the first
+ * iteration */
+ *end = '/';
+ break;
+ } else if (r == 0)
+ return -ENOTDIR;
+
+ if (end == start)
+ break;
+
+ *end = '\0';
+
+ /* Find the next component, backwards, discarding extra '/'*/
+ while (end > start && *end != '/')
+ end--;
+
+ while (end > start && *(end - 1) == '/')
+ end--;
+ }
+
+ for (; end < start + len;) {
+ if (mkdir(start, mode) < 0 && errno != EEXIST)
+ return -errno;
+
+ end += strlen(end);
+ *end = '/';
+ }
+
+ return 0;
+}
+
+int mkdir_parents(const char *path, mode_t mode)
+{
+ char *end = strrchr(path, '/');
+
+ /* no parent directories */
+ if (end == NULL)
+ return 0;
+
+ return mkdir_p(path, end - path, mode);
+}
+
const struct kmod_ext kmod_exts[] = {
{".ko", sizeof(".ko") - 1},
#ifdef ENABLE_ZLIB
diff --git a/libkmod/libkmod-util.h b/libkmod/libkmod-util.h
index 258184d..f7f3e90 100644
--- a/libkmod/libkmod-util.h
+++ b/libkmod/libkmod-util.h
@@ -5,6 +5,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
+#include <sys/stat.h>
char *getline_wrapped(FILE *fp, unsigned int *linenum) __attribute__((nonnull(1)));
@@ -19,6 +20,8 @@ int read_str_ulong(int fd, unsigned long *value, int base) _must_check_ __attrib
char *strchr_replace(char *s, int c, char r);
bool path_is_absolute(const char *p) _must_check_ __attribute__((nonnull(1)));
char *path_make_absolute_cwd(const char *p) _must_check_ __attribute__((nonnull(1)));
+int mkdir_p(const char *path, int len, mode_t mode);
+int mkdir_parents(const char *path, mode_t mode);
int alias_normalize(const char *alias, char buf[PATH_MAX], size_t *len) _must_check_ __attribute__((nonnull(1,2)));
char *modname_normalize(const char *modname, char buf[PATH_MAX], size_t *len) __attribute__((nonnull(1, 2)));
char *path_to_modname(const char *path, char buf[PATH_MAX], size_t *len) __attribute__((nonnull(2)));
diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
index f898438..ef83e31 100644
--- a/libkmod/libkmod.c
+++ b/libkmod/libkmod.c
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -33,7 +33,7 @@
#include <sys/stat.h>
#include "libkmod.h"
-#include "libkmod-private.h"
+#include "libkmod-internal.h"
#include "libkmod-index.h"
#define KMOD_HASH_SIZE (256)
@@ -99,6 +99,7 @@ void kmod_log(const struct kmod_ctx *ctx,
va_end(args);
}
+_printf_format_(6, 0)
static void log_filep(void *data,
int priority, const char *file, int line,
const char *fn, const char *format, va_list args)
@@ -218,8 +219,8 @@ static char *get_kernel_release(const char *dirname)
* kmod_new:
* @dirname: what to consider as linux module's directory, if NULL
* defaults to /lib/modules/`uname -r`. If it's relative,
- * it's treated as relative to current the current working
- * directory. Otherwise, give an absolute dirname.
+ * it's treated as relative to the current working directory.
+ * Otherwise, give an absolute dirname.
* @config_paths: ordered array of paths (directories or files) where
* to load from user-defined configuration parameters such as
* alias, blacklists, commands (install, remove). If
@@ -254,7 +255,7 @@ KMOD_EXPORT struct kmod_ctx *kmod_new(const char *dirname,
ctx->dirname = get_kernel_release(dirname);
/* environment overwrites config */
- env = getenv("KMOD_LOG");
+ env = secure_getenv("KMOD_LOG");
if (env != NULL)
kmod_set_log_priority(ctx, log_priority(env));
@@ -306,6 +307,8 @@ KMOD_EXPORT struct kmod_ctx *kmod_ref(struct kmod_ctx *ctx)
*
* Drop a reference of the kmod library context. If the refcount
* reaches zero, the resources of the context will be released.
+ *
+ * Returns: the passed kmod library context or NULL if it's freed
*/
KMOD_EXPORT struct kmod_ctx *kmod_unref(struct kmod_ctx *ctx)
{
@@ -853,7 +856,11 @@ KMOD_EXPORT void kmod_unload_resources(struct kmod_ctx *ctx)
/**
* kmod_dump_index:
* @ctx: kmod library context
- * @type: index to dump
+ * @type: index to dump, valid indexes are
+ * KMOD_INDEX_MODULES_DEP: index of module dependencies;
+ * KMOD_INDEX_MODULES_ALIAS: index of module aliases;
+ * KMOD_INDEX_MODULES_SYMBOL: index of symbol aliases;
+ * KMOD_INDEX_MODULES_BUILTIN: index of builtin module.
* @fd: file descriptor to dump index to
*
* Dump index to file descriptor. Note that this function doesn't use stdio.h
diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h
index d03ab19..3397f87 100644
--- a/libkmod/libkmod.h
+++ b/libkmod/libkmod.h
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/libkmod/macro.h b/libkmod/macro.h
index 689c57a..c6ba855 100644
--- a/libkmod/macro.h
+++ b/libkmod/macro.h
@@ -1,7 +1,7 @@
/*
* libkmod - interface to kernel module operations
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,25 +21,16 @@
#include <stddef.h>
-#define BUILD_ASSERT(cond) \
- do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
-
-#define EXPR_BUILD_ASSERT(cond) \
- (sizeof(char [1 - 2*!(cond)]) - 1)
+#define assert_cc(expr) \
+ _Static_assert((expr), #expr)
#if HAVE_TYPEOF
-#define check_type(expr, type) \
- ((typeof(expr) *)0 != (type *)0)
-
#define check_types_match(expr1, expr2) \
((typeof(expr1) *)0 != (typeof(expr2) *)0)
#else
/* Without typeof, we can only test the sizes. */
-#define check_type(expr, type) \
- EXPR_BUILD_ASSERT(sizeof(expr) == sizeof(type))
-
#define check_types_match(expr1, expr2) \
- EXPR_BUILD_ASSERT(sizeof(expr1) == sizeof(expr2))
+ assert_cc(sizeof(expr1) == sizeof(expr2))
#endif /* HAVE_TYPEOF */
#define container_of(member_ptr, containing_type, member) \
@@ -47,26 +38,13 @@
((char *)(member_ptr) - offsetof(containing_type, member)) \
- check_types_match(*(member_ptr), ((containing_type *)0)->member))
-/*
- * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
- * @cond: the compile-time condition which must be true.
- *
- * Your compile will fail if the condition isn't true, or can't be evaluated
- * by the compiler. This can be used in an expression: its value is "0".
- *
- * Example:
- * #define foo_to_char(foo) \
- * ((char *)(foo) \
- * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
- */
-#define BUILD_ASSERT_OR_ZERO(cond) \
- (sizeof(char [1 - 2*!(cond)]) - 1)
/* Two gcc extensions.
* &a[0] degrades to a pointer: a different type from an array */
-#define _array_size_chk(arr) \
- BUILD_ASSERT_OR_ZERO(!__builtin_types_compatible_p(typeof(arr), \
- typeof(&(arr)[0])))
+#define _array_size_chk(arr) ({ \
+ assert_cc(!__builtin_types_compatible_p(typeof(arr), typeof(&(arr)[0]))); \
+ 0; \
+ })
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr))
diff --git a/libkmod/missing.h b/libkmod/missing.h
new file mode 100644
index 0000000..b45bbe2
--- /dev/null
+++ b/libkmod/missing.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <unistd.h>
+#include <sys/syscall.h>
+
+#ifdef HAVE_LINUX_MODULE_H
+#include <linux/module.h>
+#endif
+
+#ifndef MODULE_INIT_IGNORE_MODVERSIONS
+# define MODULE_INIT_IGNORE_MODVERSIONS 1
+#endif
+
+#ifndef MODULE_INIT_IGNORE_VERMAGIC
+# define MODULE_INIT_IGNORE_VERMAGIC 2
+#endif
+
+#ifndef __NR_finit_module
+# define __NR_finit_module -1
+#endif
+
+#ifndef HAVE_FINIT_MODULE
+#include <errno.h>
+
+static inline int finit_module(int fd, const char *uargs, int flags)
+{
+ if (__NR_finit_module == -1) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ return syscall(__NR_finit_module, fd, uargs, flags);
+}
+#endif
diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4
index 0ada151..ac2eccb 100644
--- a/m4/gtk-doc.m4
+++ b/m4/gtk-doc.m4
@@ -37,7 +37,7 @@ AC_DEFUN([GTK_DOC_CHECK],
dnl don't check for glib if we build glib
if test "x$PACKAGE_NAME" != "xglib"; then
dnl don't fail if someone does not have glib
- PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,)
+ PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
fi
fi
@@ -58,6 +58,10 @@ AC_DEFUN([GTK_DOC_CHECK],
enable_gtk_doc_pdf=no
fi
+ if test -z "$AM_DEFAULT_VERBOSITY"; then
+ AM_DEFAULT_VERBOSITY=1
+ fi
+ AC_SUBST([AM_DEFAULT_VERBOSITY])
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
diff --git a/man/Makefile.am b/man/Makefile.am
index 6ab36c1..12870bd 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -2,6 +2,10 @@ MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
MAN_STUB = modules.dep.bin.5
+AM_V_XSLT = $(AM_V_XSLT_$(V))
+AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo " XSLT " $@;
+
if BUILD_TOOLS
dist_man_MANS = $(MAN5) $(MAN8) $(MAN_STUB)
modules.dep.bin.5: modules.dep.5
@@ -17,5 +21,5 @@ XSLTPROC_FLAGS = \
CLEANFILES = $(dist_man_MANS)
%.5 %.8: %.xml
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
+ $(AM_V_XSLT)$(XSLTPROC) $(XSLTPROC_FLAGS) \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
diff --git a/man/Makefile.in b/man/Makefile.in
index 7ac0616..50131bf 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.5 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,23 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -50,8 +78,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = man
-DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(dist_man_MANS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -115,6 +143,7 @@ am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(dist_man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -202,6 +231,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+bashcompletiondir = @bashcompletiondir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -250,6 +280,9 @@ zlib_LIBS = @zlib_LIBS@
MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
MAN_STUB = modules.dep.bin.5
+AM_V_XSLT = $(AM_V_XSLT_$(V))
+AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo " XSLT " $@;
@BUILD_TOOLS_TRUE@dist_man_MANS = $(MAN5) $(MAN8) $(MAN_STUB)
EXTRA_DIST = $(MAN5:%.5=%.xml) $(MAN8:%.8=%.xml)
XSLTPROC_FLAGS = \
@@ -383,29 +416,14 @@ uninstall-man8:
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically 'make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -544,22 +562,22 @@ uninstall-man: uninstall-man5 uninstall-man8
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-man5 \
- install-man8 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-man uninstall-man5 \
- uninstall-man8
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man5 install-man8 install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-man uninstall-man5 uninstall-man8
@BUILD_TOOLS_TRUE@modules.dep.bin.5: modules.dep.5
%.5 %.8: %.xml
- $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
+ $(AM_V_XSLT)$(XSLTPROC) $(XSLTPROC_FLAGS) \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/man/depmod.8 b/man/depmod.8
index 979e1dc..9347190 100644
--- a/man/depmod.8
+++ b/man/depmod.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: depmod
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: depmod
.\" Source: kmod
.\" Language: English
.\"
-.TH "DEPMOD" "8" "12/05/2012" "kmod" "depmod"
+.TH "DEPMOD" "8" "08/22/2013" "kmod" "depmod"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -38,7 +38,6 @@ depmod \- Generate modules\&.dep and map files\&.
.PP
Linux kernel modules can provide services (called "symbols") for other modules to use (using one of the EXPORT_SYMBOL variants in the code)\&. If a second module uses this symbol, that second module clearly depends on the first module\&. These dependencies can get quite complex\&.
.PP
-
\fBdepmod\fR
creates a list of module dependencies by reading each module under
/lib/modules/\fIversion\fR
@@ -153,7 +152,6 @@ Warn on duplicate dependencies, aliases, symbol versions, etc\&.
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Portions Copyright Jon Masters, and others\&.
.SH "SEE ALSO"
.PP
-
\fBdepmod.d\fR(5),
\fBmodprobe\fR(8),
\fBmodules.dep\fR(5)
diff --git a/man/depmod.d.5 b/man/depmod.d.5
index 6b1c3be..e665409 100644
--- a/man/depmod.d.5
+++ b/man/depmod.d.5
@@ -1,13 +1,13 @@
'\" t
.\" Title: depmod.d
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: depmod.d
.\" Source: kmod
.\" Language: English
.\"
-.TH "DEPMOD\&.D" "5" "12/05/2012" "kmod" "depmod.d"
+.TH "DEPMOD\&.D" "5" "08/22/2013" "kmod" "depmod.d"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -78,7 +78,6 @@ subdirectory within /lib/modules (or other module location) will take priority o
This manual page Copyright 2006\-2010, Jon Masters, Red Hat, Inc\&.
.SH "SEE ALSO"
.PP
-
\fBdepmod\fR(8)
.SH "AUTHORS"
.PP
diff --git a/man/insmod.8 b/man/insmod.8
index 3cd7089..5a4e481 100644
--- a/man/insmod.8
+++ b/man/insmod.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: insmod
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: insmod
.\" Source: kmod
.\" Language: English
.\"
-.TH "INSMOD" "8" "12/05/2012" "kmod" "insmod"
+.TH "INSMOD" "8" "08/22/2013" "kmod" "insmod"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,7 +34,6 @@ insmod \- Simple program to insert a module into the Linux Kernel
\fBinsmod\fR [\fIfilename\fR] [\fImodule\ options\fR...]
.SH "DESCRIPTION"
.PP
-
\fBinsmod\fR
is a trivial program to insert a module into the kernel\&. Most users will want to use
\fBmodprobe\fR(8)
@@ -48,11 +47,9 @@ usually gives more information about errors\&.
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBmodprobe\fR(8),
\fBrmmod\fR(8),
-\fBlsmod\fR(8)
-\fBmodinfo\fR(8)
+\fBlsmod\fR(8)\fBmodinfo\fR(8)
.SH "AUTHORS"
.PP
\fBJon Masters\fR <\&jcm@jonmasters\&.org\&>
diff --git a/man/lsmod.8 b/man/lsmod.8
index 06e838b..d53b02d 100644
--- a/man/lsmod.8
+++ b/man/lsmod.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: lsmod
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: lsmod
.\" Source: kmod
.\" Language: English
.\"
-.TH "LSMOD" "8" "12/05/2012" "kmod" "lsmod"
+.TH "LSMOD" "8" "08/22/2013" "kmod" "lsmod"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,7 +34,6 @@ lsmod \- Show the status of modules in the Linux Kernel
\fBlsmod\fR
.SH "DESCRIPTION"
.PP
-
\fBlsmod\fR
is a trivial program which nicely formats the contents of the
/proc/modules, showing what kernel modules are currently loaded\&.
@@ -43,7 +42,6 @@ is a trivial program which nicely formats the contents of the
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBinsmod\fR(8),
\fBmodprobe\fR(8),
\fBmodinfo\fR(8)
diff --git a/man/modinfo.8 b/man/modinfo.8
index a9def1f..cf90620 100644
--- a/man/modinfo.8
+++ b/man/modinfo.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: modinfo
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: modinfo
.\" Source: kmod
.\" Language: English
.\"
-.TH "MODINFO" "8" "12/05/2012" "kmod" "modinfo"
+.TH "MODINFO" "8" "08/22/2013" "kmod" "modinfo"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -38,7 +38,6 @@ modinfo \- Show information about a Linux Kernel module
\fBmodinfo \-h\fR
.SH "DESCRIPTION"
.PP
-
\fBmodinfo\fR
extracts information from the Linux Kernel modules given on the command line\&. If the module name is not a filename, then the
/lib/modules/\fIversion\fR
@@ -46,7 +45,6 @@ directory is searched, as is also done by
\fBmodprobe\fR(8)
when loading kernel modules\&.
.PP
-
\fBmodinfo\fR
by default lists each attribute of the module in form
\fIfieldname\fR
@@ -117,7 +115,6 @@ arguments, to ease the transition from the old modutils
This manual page originally Copyright 2003, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBmodprobe\fR(8)
.SH "AUTHORS"
.PP
diff --git a/man/modprobe.8 b/man/modprobe.8
index 668d32f..6b6b7fd 100644
--- a/man/modprobe.8
+++ b/man/modprobe.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: modprobe
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: modprobe
.\" Source: kmod
.\" Language: English
.\"
-.TH "MODPROBE" "8" "12/05/2012" "kmod" "modprobe"
+.TH "MODPROBE" "8" "08/22/2013" "kmod" "modprobe"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -40,7 +40,6 @@ modprobe \- Add and remove modules from the Linux Kernel
\fBmodprobe\fR [\-\-dump\-modversions] [\fIfilename\fR]
.SH "DESCRIPTION"
.PP
-
\fBmodprobe\fR
intelligently adds or removes a module from the Linux kernel: note that for convenience, there is no difference between _ and \- in module names (automatic underscore conversion is performed)\&.
\fBmodprobe\fR
@@ -58,7 +57,6 @@ Note that unlike in 2\&.4 series Linux kernels (which are not supported by this
does not do anything to the module itself: the work of resolving symbols and understanding parameters is done inside the kernel\&. So module failure is sometimes accompanied by a kernel message: see
\fBdmesg\fR(8)\&.
.PP
-
\fBmodprobe\fR
expects an up\-to\-date
modules\&.dep\&.bin
@@ -266,7 +264,6 @@ The MODPROBE_OPTIONS environment variable can also be used to pass arguments to
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBmodprobe.d\fR(5),
\fBinsmod\fR(8),
\fBrmmod\fR(8),
diff --git a/man/modprobe.d.5 b/man/modprobe.d.5
index 834218b..9063f37 100644
--- a/man/modprobe.d.5
+++ b/man/modprobe.d.5
@@ -1,13 +1,13 @@
'\" t
.\" Title: modprobe.d
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: modprobe.d
.\" Source: kmod
.\" Language: English
.\"
-.TH "MODPROBE\&.D" "5" "12/05/2012" "kmod" "modprobe.d"
+.TH "MODPROBE\&.D" "5" "08/22/2013" "kmod" "modprobe.d"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@
modprobe.d \- Configuration directory for modprobe
.SH "SYNOPSIS"
.PP
-/usr/lib/modprobe\&.d/*\&.conf
+/lib/modprobe\&.d/*\&.conf
.PP
/etc/modprobe\&.d/*\&.conf
.PP
@@ -101,8 +101,7 @@ options \fImodulename\fR \fIoption\&.\&.\&.\fR
This command allows you to add options to the module
\fImodulename\fR
(which might be an alias) every time it is inserted into the kernel: whether directly (using
-\fBmodprobe\fR
-\fImodulename\fR
+\fBmodprobe\fR\fImodulename\fR
or because the module being inserted depends on this module\&.
.sp
All options are added together: they can come from an
diff --git a/man/modprobe.d.xml b/man/modprobe.d.xml
index dc19b23..7b0c298 100644
--- a/man/modprobe.d.xml
+++ b/man/modprobe.d.xml
@@ -40,7 +40,7 @@
</refnamediv>
<refsynopsisdiv>
- <para><filename>/usr/lib/modprobe.d/*.conf</filename></para>
+ <para><filename>/lib/modprobe.d/*.conf</filename></para>
<para><filename>/etc/modprobe.d/*.conf</filename></para>
<para><filename>/run/modprobe.d/*.conf</filename></para>
</refsynopsisdiv>
diff --git a/man/modules.dep.5 b/man/modules.dep.5
index ca483ae..4a043ea 100644
--- a/man/modules.dep.5
+++ b/man/modules.dep.5
@@ -1,13 +1,13 @@
'\" t
.\" Title: modules.dep
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: modules.dep
.\" Source: kmod
.\" Language: English
.\"
-.TH "MODULES\&.DEP" "5" "12/05/2012" "kmod" "modules.dep"
+.TH "MODULES\&.DEP" "5" "08/22/2013" "kmod" "modules.dep"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -56,7 +56,6 @@ command to obtain information about modules in a future proof and compatible fas
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBdepmod\fR(8),
\fBmodprobe\fR(8)
.SH "AUTHORS"
diff --git a/man/rmmod.8 b/man/rmmod.8
index 3290540..0d16d7e 100644
--- a/man/rmmod.8
+++ b/man/rmmod.8
@@ -1,13 +1,13 @@
'\" t
.\" Title: rmmod
.\" Author: Jon Masters <jcm@jonmasters.org>
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/05/2012
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 08/22/2013
.\" Manual: rmmod
.\" Source: kmod
.\" Language: English
.\"
-.TH "RMMOD" "8" "12/05/2012" "kmod" "rmmod"
+.TH "RMMOD" "8" "08/22/2013" "kmod" "rmmod"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,7 +34,6 @@ rmmod \- Simple program to remove a module from the Linux Kernel
\fBrmmod\fR [\fB\-f\fR] [\fB\-w\fR] [\fB\-s\fR] [\fB\-v\fR] [\fImodulename\fR]
.SH "DESCRIPTION"
.PP
-
\fBrmmod\fR
is a trivial program to remove a module (when module unloading support is provided) from the kernel\&. Most users will want to use
\fBmodprobe\fR(8)
@@ -80,11 +79,9 @@ Show version of program and exit\&.
This manual page originally Copyright 2002, Rusty Russell, IBM Corporation\&. Maintained by Jon Masters and others\&.
.SH "SEE ALSO"
.PP
-
\fBmodprobe\fR(8),
\fBinsmod\fR(8),
-\fBlsmod\fR(8)
-\fBmodinfo\fR(8)
+\fBlsmod\fR(8)\fBmodinfo\fR(8)
.SH "AUTHORS"
.PP
\fBJon Masters\fR <\&jcm@jonmasters\&.org\&>
diff --git a/shell-completion/bash/kmod b/shell-completion/bash/kmod
new file mode 100644
index 0000000..f4da09d
--- /dev/null
+++ b/shell-completion/bash/kmod
@@ -0,0 +1,103 @@
+# kmod completion -*- shell-script -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010 Ran Benita
+# Copyright (C) 2013 Intel Corporation. All rights reserved.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+
+__contains_word () {
+ local word=$1; shift
+ for w in "$@"; do [[ "$w" = "$word" ]] && return 0; done
+ return 1
+}
+
+__is_opt () {
+ local prevprev=${COMP_WORDS[COMP_CWORD-2]}
+ local short="$1" long="$2"
+
+ if [[ "$prev" = "$short" || "$prev" = "$long" ]]; then
+ declare -g cur=${cur#=}
+ return 0
+ elif [[ "$prev" = "=" && "$prevprev" = "$long" ]]; then
+ return 0
+ fi
+
+ return 1
+}
+
+_kmod_static_nodes () {
+ local OPTS='-o -f -h --help'
+ local OPTS_EQUAL='--output --format'
+ local GROUP_FORMAT='human tmpfiles devname'
+
+ if __is_opt '-o' '--output'; then
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- "$cur") )
+ return 0
+ elif __is_opt '-f' '--format'; then
+ COMPREPLY=( $(compgen -W "$GROUP_FORMAT" -- "$cur" ) )
+ return 0
+ fi
+
+ local cur=${COMP_WORDS[COMP_CWORD]}
+
+ compopt -o nospace
+ COMPREPLY=( $(compgen -W "$OPTS" -- "$cur") )
+ COMPREPLY+=( $(compgen -W "$OPTS_EQUAL" -S= -- "$cur") )
+}
+
+_kmod() {
+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
+ local VERBS=(help list static-nodes)
+ local OPTS='-h --help -V --version'
+ local verb
+
+ # standalone options, no other option or action allowed
+ for ((i=0; $i < $COMP_CWORD; i++)); do
+ if __contains_word "${COMP_WORDS[i]}" ${OPTS}; then
+ return 0
+ fi
+ done
+
+ # find the action
+ for ((i=0; $i <= $COMP_CWORD; i++)); do
+ if __contains_word "${COMP_WORDS[i]}" "${VERBS[@]}"; then
+ verb=${COMP_WORDS[i]}
+ break
+ fi
+ done
+
+ if [[ -z $verb ]]; then
+ COMPREPLY=( $(compgen -W '${OPTS[*]} ${VERBS[*]}' -- "$cur") )
+ return 0
+ fi
+
+ local func=${verb//-/_}
+
+ if declare -F _kmod_${func} > /dev/null; then
+ _kmod_${func}
+ fi
+
+ # allow the space if there's only one completion and it doesn't end with
+ # '='
+ if [[ ${#COMPREPLY[@]} == 1 && ${COMPREPLY[0]} != *"=" ]] ; then
+ compopt +o nospace
+ fi
+
+ return 0
+}
+
+complete -F _kmod kmod
diff --git a/testsuite/delete_module.c b/testsuite/delete_module.c
index a5e79e8..9718894 100644
--- a/testsuite/delete_module.c
+++ b/testsuite/delete_module.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/init_module.c b/testsuite/init_module.c
index 2e05de7..42177e7 100644
--- a/testsuite/init_module.c
+++ b/testsuite/init_module.c
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 Lucas De Marchi <lucas.de.marchi@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,6 +17,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifndef HAVE_FINIT_MODULE
+#define HAVE_FINIT_MODULE 1
+#endif
+
#include <assert.h>
#include <elf.h>
#include <errno.h>
@@ -28,16 +33,17 @@
#include <stddef.h>
#include <string.h>
#include <stdio.h>
+#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/syscall.h>
#include <unistd.h>
/* kmod_elf_get_section() is not exported, we need the private header */
-#include <libkmod-private.h>
+#include <libkmod-internal.h>
/* FIXME: hack, change name so we don't clash */
#undef ERR
-#include "mkdir.h"
#include "testsuite.h"
#include "stripped-module.h"
@@ -149,7 +155,7 @@ static int create_sysfs_files(const char *modname)
strcpy(buf + len, modname);
len += strlen(modname);
- assert(mkdir_p(buf, 0755) >= 0);
+ assert(mkdir_p(buf, len, 0755) >= 0);
strcpy(buf + len, "/initstate");
return write_one_line_file(buf, "live\n", strlen("live\n"));
@@ -274,6 +280,63 @@ long init_module(void *mem, unsigned long len, const char *args)
return err;
}
+TS_EXPORT int finit_module(const int fd, const char *args, const int flags);
+
+int finit_module(const int fd, const char *args, const int flags)
+{
+ int err;
+ void *mem;
+ unsigned long len;
+ struct stat st;
+
+ if (fstat(fd, &st) < 0)
+ return -1;
+
+ len = st.st_size;
+ mem = mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0);
+ if (mem == MAP_FAILED)
+ return -1;
+
+ err = init_module(mem, len, args);
+ munmap(mem, len);
+
+ return err;
+}
+
+TS_EXPORT long int syscall(long int __sysno, ...)
+{
+ va_list ap;
+ long ret;
+
+ if (__sysno == -1) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ if (__sysno == __NR_finit_module) {
+ const char *args;
+ int flags;
+ int fd;
+
+ va_start(ap, __sysno);
+
+ fd = va_arg(ap, int);
+ args = va_arg(ap, const char *);
+ flags = va_arg(ap, int);
+
+ ret = finit_module(fd, args, flags);
+
+ va_end(ap);
+ return ret;
+ }
+
+ /*
+ * FIXME: no way to call the libc function - let's hope there are no
+ * other users.
+ */
+ abort();
+}
+
/* the test is going away anyway, but lets keep valgrind happy */
void free_resources(void) __attribute__((destructor));
void free_resources(void)
diff --git a/testsuite/mkdir.c b/testsuite/mkdir.c
deleted file mode 100644
index 0a7de69..0000000
--- a/testsuite/mkdir.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <errno.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "mkdir.h"
-#include "testsuite.h"
-
-TS_EXPORT int mkdir_p(const char *path, mode_t mode)
-{
- char *start = strdupa(path);
- int len = strlen(path);
- char *end = start + len;
- struct stat st;
-
- /*
- * scan backwards, replacing '/' with '\0' while the component doesn't
- * exist
- */
- for (;;) {
- if (stat(start, &st) >= 0) {
- if (S_ISDIR(st.st_mode))
- break;
- return -ENOTDIR;
- }
-
- /* Find the next component, backwards, discarding extra '/'*/
- for (; end != start && *end != '/'; end--)
- ;
-
- for (; end != start - 1 && *end == '/'; end--)
- ;
-
- end++;
- if (end == start)
- break;
-
- *end = '\0';
- }
-
- if (end == start + len)
- return 0;
-
- for (; end < start + len;) {
- *end = '/';
- end += strlen(end);
-
- if (mkdir(start, mode) < 0)
- return -errno;
- }
-
- return 0;
-}
diff --git a/testsuite/mkdir.h b/testsuite/mkdir.h
deleted file mode 100644
index 35f6a1d..0000000
--- a/testsuite/mkdir.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-#include <sys/stat.h>
-#include <sys/types.h>
-
-int mkdir_p(const char *path, mode_t mode);
diff --git a/testsuite/path.c b/testsuite/path.c
index c13ff4b..f87f5c5 100644
--- a/testsuite/path.c
+++ b/testsuite/path.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/rootfs-pristine/test-modinfo/correct.txt b/testsuite/rootfs-pristine/test-modinfo/correct.txt
index 1682154..4a7a4ac 100644
--- a/testsuite/rootfs-pristine/test-modinfo/correct.txt
+++ b/testsuite/rootfs-pristine/test-modinfo/correct.txt
@@ -26,3 +26,27 @@ author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theod
srcversion: A80608676B83D55514B450E
depends: mbcache,jbd2
vermagic: 2.6.32-220.el6.x86_64 SMP mod_unload modversions
+filename: /ext4-x86_64-sha1.ko
+license: GPL
+description: Fourth Extended Filesystem
+author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
+alias: ext3
+alias: ext2
+depends: mbcache,jbd2
+intree: Y
+vermagic: 3.7.0 SMP mod_unload
+signer: Magrathea: Glacier signing key
+sig_key: E3:C8:FC:A7:3F:B3:1D:DE:84:81:EF:38:E3:4C:DE:4B:0C:FD:1B:F9
+sig_hashalgo: sha1
+filename: /ext4-x86_64-sha256.ko
+license: GPL
+description: Fourth Extended Filesystem
+author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
+alias: ext3
+alias: ext2
+depends: mbcache,jbd2
+intree: Y
+vermagic: 3.7.0 SMP mod_unload
+signer: Magrathea: Glacier signing key
+sig_key: E3:C8:FC:A7:3F:B3:1D:DE:84:81:EF:38:E3:4C:DE:4B:0C:FD:1B:F9
+sig_hashalgo: sha256
diff --git a/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha1.ko b/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha1.ko
new file mode 100644
index 0000000..6e894f9
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha1.ko
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha256.ko b/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha256.ko
new file mode 100644
index 0000000..bf72008
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modinfo/ext4-x86_64-sha256.ko
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/correct-psmouse.txt b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/correct-psmouse.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/correct-psmouse.txt
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/etc/modprobe.d/bogus.conf b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/etc/modprobe.d/bogus.conf
new file mode 100644
index 0000000..14bed0b
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/etc/modprobe.d/bogus.conf
@@ -0,0 +1 @@
+alias psmouse deaddood
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko
new file mode 100644
index 0000000..4eac2a3
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias
new file mode 100644
index 0000000..a4e7677
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias
@@ -0,0 +1,3 @@
+# Aliases extracted from modules themselves.
+alias serio:ty05pr*id*ex* psmouse
+alias serio:ty01pr*id*ex* psmouse
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias.bin b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias.bin
new file mode 100644
index 0000000..0b13537
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.alias.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.builtin.bin b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.builtin.bin
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.builtin.bin
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep
new file mode 100644
index 0000000..7ba5711
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep
@@ -0,0 +1 @@
+kernel/drivers/input/mouse/psmouse.ko:
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep.bin b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep.bin
new file mode 100644
index 0000000..bdd0eb5
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.dep.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.devname b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.devname
new file mode 100644
index 0000000..58f6d6d
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.devname
@@ -0,0 +1 @@
+# Device nodes to trigger on-demand module loading.
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.softdep b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.softdep
new file mode 100644
index 0000000..3cc0512
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.softdep
@@ -0,0 +1,2 @@
+# Soft dependencies extracted from modules themselves.
+# Copy, with a .conf extension, to /etc/modprobe.d to use it with modprobe.
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols
new file mode 100644
index 0000000..618c345
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols
@@ -0,0 +1 @@
+# Aliases for symbols, used by symbol_request().
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols.bin b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols.bin
new file mode 100644
index 0000000..7075435
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/lib/modules/4.4.4/modules.symbols.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/alias-to-none/proc/modules b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/proc/modules
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/alias-to-none/proc/modules
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/correct.txt b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/correct.txt
new file mode 100644
index 0000000..cea9626
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/correct.txt
@@ -0,0 +1 @@
+insmod /lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko foo bar=1
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko
new file mode 100644
index 0000000..4eac2a3
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/kernel/drivers/input/mouse/psmouse.ko
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias
new file mode 100644
index 0000000..a4e7677
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias
@@ -0,0 +1,3 @@
+# Aliases extracted from modules themselves.
+alias serio:ty05pr*id*ex* psmouse
+alias serio:ty01pr*id*ex* psmouse
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias.bin b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias.bin
new file mode 100644
index 0000000..0b13537
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.alias.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.builtin.bin b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.builtin.bin
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.builtin.bin
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep
new file mode 100644
index 0000000..7ba5711
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep
@@ -0,0 +1 @@
+kernel/drivers/input/mouse/psmouse.ko:
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep.bin b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep.bin
new file mode 100644
index 0000000..bdd0eb5
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.dep.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.devname b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.devname
new file mode 100644
index 0000000..58f6d6d
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.devname
@@ -0,0 +1 @@
+# Device nodes to trigger on-demand module loading.
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.softdep b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.softdep
new file mode 100644
index 0000000..3cc0512
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.softdep
@@ -0,0 +1,2 @@
+# Soft dependencies extracted from modules themselves.
+# Copy, with a .conf extension, to /etc/modprobe.d to use it with modprobe.
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols
new file mode 100644
index 0000000..618c345
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols
@@ -0,0 +1 @@
+# Aliases for symbols, used by symbol_request().
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols.bin b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols.bin
new file mode 100644
index 0000000..7075435
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/lib/modules/4.4.4/modules.symbols.bin
Binary files differ
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/cmdline b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/cmdline
new file mode 100644
index 0000000..31126a9
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/cmdline
@@ -0,0 +1 @@
+initrd=\initramfs-linux.img psmouse.foo psmouse.bar=1 root=/dev/sda2 rootfstype=ext4 add_efi_memmap quiet rw
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/modules b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/modules
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline/proc/modules
diff --git a/testsuite/test-alias.c b/testsuite/test-alias.c
index 0a1e08c..5e21573 100644
--- a/testsuite/test-alias.c
+++ b/testsuite/test-alias.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
* Copyright (C) 2012 Pedro Pedruzzi
*
* This program is free software; you can redistribute it and/or
diff --git a/testsuite/test-blacklist.c b/testsuite/test-blacklist.c
index c96fe80..5b88caf 100644
--- a/testsuite/test-blacklist.c
+++ b/testsuite/test-blacklist.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -27,7 +27,7 @@
/* good luck bulding a kmod_list outside of the library... makes this blacklist
* function rather pointless */
-#include <libkmod-private.h>
+#include <libkmod-internal.h>
/* FIXME: hack, change name so we don't clash */
#undef ERR
diff --git a/testsuite/test-dependencies.c b/testsuite/test-dependencies.c
index 1dc02d1..cdd8066 100644
--- a/testsuite/test-dependencies.c
+++ b/testsuite/test-dependencies.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c
index 4317327..0ea8982 100644
--- a/testsuite/test-depmod.c
+++ b/testsuite/test-depmod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/test-init.c b/testsuite/test-init.c
index 773698a..47a6512 100644
--- a/testsuite/test-init.c
+++ b/testsuite/test-init.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/test-loaded.c b/testsuite/test-loaded.c
index 7fcf7e1..33865cb 100644
--- a/testsuite/test-loaded.c
+++ b/testsuite/test-loaded.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/test-modinfo.c b/testsuite/test-modinfo.c
index 3a01fa1..c5934ea 100644
--- a/testsuite/test-modinfo.c
+++ b/testsuite/test-modinfo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -32,7 +32,8 @@ static __noreturn int modinfo_jonsmodules(const struct test *t)
const char *const args[] = {
progname,
"/ext4-i686.ko", "/ext4-ppc64.ko", "/ext4-s390x.ko",
- "/ext4-x86_64.ko",
+ "/ext4-x86_64.ko", "/ext4-x86_64-sha1.ko",
+ "/ext4-x86_64-sha256.ko",
NULL,
};
diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c
index 391eb49..f0131e3 100644
--- a/testsuite/test-modprobe.c
+++ b/testsuite/test-modprobe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -70,6 +70,30 @@ static DEFINE_TEST(modprobe_show_depends2,
.stdout = TESTSUITE_ROOTFS "test-modprobe/show-depends/correct-psmouse.txt",
});
+
+static __noreturn int modprobe_show_alias_to_none(const struct test *t)
+{
+ const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
+ const char *const args[] = {
+ progname,
+ "--show-depends", "--ignore-install", "--quiet", "psmouse",
+ NULL,
+ };
+
+ test_spawn_prog(progname, args);
+ exit(EXIT_FAILURE);
+}
+static DEFINE_TEST(modprobe_show_alias_to_none,
+ .description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
+ .config = {
+ [TC_UNAME_R] = "4.4.4",
+ [TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/alias-to-none",
+ },
+ .output = {
+ .stdout = TESTSUITE_ROOTFS "test-modprobe/show-depends/correct-psmouse.txt",
+ });
+
+
static __noreturn int modprobe_builtin(const struct test *t)
{
const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
@@ -134,12 +158,37 @@ static DEFINE_TEST(modprobe_install_cmd_loop,
},
);
+static __noreturn int modprobe_param_kcmdline(const struct test *t)
+{
+ const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
+ const char *const args[] = {
+ progname,
+ "--show-depends", "psmouse",
+ NULL,
+ };
+
+ test_spawn_prog(progname, args);
+ exit(EXIT_FAILURE);
+}
+static DEFINE_TEST(modprobe_param_kcmdline,
+ .description = "check if params are parsed correctly from kcmdline",
+ .config = {
+ [TC_UNAME_R] = "4.4.4",
+ [TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline",
+ },
+ .output = {
+ .stdout = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline/correct.txt",
+ });
+
+
static const struct test *tests[] = {
&smodprobe_show_depends,
&smodprobe_show_depends2,
+ &smodprobe_show_alias_to_none,
&smodprobe_builtin,
&smodprobe_softdep_loop,
&smodprobe_install_cmd_loop,
+ &smodprobe_param_kcmdline,
NULL,
};
diff --git a/testsuite/test-new-module.c b/testsuite/test-new-module.c
index 89d70bd..240480e 100644
--- a/testsuite/test-new-module.c
+++ b/testsuite/test-new-module.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/test-testsuite.c b/testsuite/test-testsuite.c
index 8518431..f52dd1f 100644
--- a/testsuite/test-testsuite.c
+++ b/testsuite/test-testsuite.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c
index db51dae..6d85d7f 100644
--- a/testsuite/testsuite.c
+++ b/testsuite/testsuite.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -440,7 +440,7 @@ static inline int safe_read(int fd, void *buf, size_t count)
while (1) {
r = read(fd, buf, count);
- if (r == -1 && errno == -EINTR)
+ if (r == -1 && errno == EINTR)
continue;
break;
}
@@ -573,7 +573,7 @@ static inline int test_run_parent(const struct test *t, int fdout[2],
} else if (WIFSIGNALED(err)) {
ERR("'%s' [%u] terminated by signal %d (%s)\n", t->name, pid,
WTERMSIG(err), strsignal(WTERMSIG(err)));
- return EXIT_FAILURE;
+ return t->expected_fail ? EXIT_SUCCESS : EXIT_FAILURE;
}
if (matchout)
diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h
index 80bf8a1..329d4a1 100644
--- a/testsuite/testsuite.h
+++ b/testsuite/testsuite.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/testsuite/uname.c b/testsuite/uname.c
index 2315668..2ada200 100644
--- a/testsuite/uname.c
+++ b/testsuite/uname.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/tools/depmod.c b/tools/depmod.c
index 682e662..985cf3a 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -1,7 +1,7 @@
/*
* kmod-depmod - calculate modules.dep using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ static const struct option cmdopts[] = {
{ "verbose", no_argument, 0, 'v' },
{ "show", no_argument, 0, 'n' },
{ "dry-run", no_argument, 0, 'n' },
- { "symbol-prefix", no_argument, 0, 'P' },
+ { "symbol-prefix", required_argument, 0, 'P' },
{ "warn", no_argument, 0, 'w' },
{ "map", no_argument, 0, 'm' }, /* deprecated */
{ "version", no_argument, 0, 'V' },
@@ -101,6 +101,7 @@ static void help(void)
program_invocation_short_name);
}
+_printf_format_(1, 2)
static inline void _show(const char *fmt, ...)
{
va_list args;
@@ -847,7 +848,7 @@ static int cfg_files_list(struct cfg_file ***p_files, size_t *p_n_files,
if (S_ISREG(st.st_mode)) {
cfg_files_insert_sorted(p_files, p_n_files, path, NULL);
return 0;
- } if (!S_ISDIR(st.st_mode)) {
+ } else if (!S_ISDIR(st.st_mode)) {
ERR("unsupported file mode %s: %#x\n", path, st.st_mode);
return -EINVAL;
}
@@ -1256,7 +1257,7 @@ static int depmod_modules_search_dir(struct depmod *depmod, DIR *d, size_t basel
namelen = strlen(name);
if (baselen + namelen + 2 >= PATH_MAX) {
path[baselen] = '\0';
- ERR("path is too long %s%s %zd\n", path, name);
+ ERR("path is too long %s%s\n", path, name);
continue;
}
memcpy(path + baselen, name, namelen + 1);
@@ -1428,13 +1429,14 @@ corrupted:
}
static int depmod_symbol_add(struct depmod *depmod, const char *name,
- uint64_t crc, const struct mod *owner)
+ bool prefix_skipped, uint64_t crc,
+ const struct mod *owner)
{
size_t namelen;
int err;
struct symbol *sym;
- if (name[0] == depmod->cfg->sym_prefix)
+ if (!prefix_skipped && (name[0] == depmod->cfg->sym_prefix))
name++;
namelen = strlen(name) + 1;
@@ -1491,7 +1493,7 @@ static int depmod_load_modules(struct depmod *depmod)
kmod_list_foreach(l, list) {
const char *name = kmod_module_symbol_get_symbol(l);
uint64_t crc = kmod_module_symbol_get_crc(l);
- depmod_symbol_add(depmod, name, crc, mod);
+ depmod_symbol_add(depmod, name, false, crc, mod);
}
kmod_module_symbols_free_list(list);
@@ -1503,7 +1505,7 @@ load_info:
mod->kmod = NULL;
}
- DBG("loaded symbols (%zd modules, %zd symbols)\n",
+ DBG("loaded symbols (%zd modules, %u symbols)\n",
depmod->modules.count, hash_get_count(depmod->symbols));
return 0;
@@ -1549,7 +1551,7 @@ static int depmod_load_dependencies(struct depmod *depmod)
{
struct mod **itr, **itr_end;
- DBG("load dependencies (%zd modules, %zd symbols)\n",
+ DBG("load dependencies (%zd modules, %u symbols)\n",
depmod->modules.count, hash_get_count(depmod->symbols));
itr = (struct mod **)depmod->modules.array;
@@ -1565,7 +1567,7 @@ static int depmod_load_dependencies(struct depmod *depmod)
depmod_load_module_dependencies(depmod, mod);
}
- DBG("loaded dependencies (%zd modules, %zd symbols)\n",
+ DBG("loaded dependencies (%zd modules, %u symbols)\n",
depmod->modules.count, hash_get_count(depmod->symbols));
return 0;
@@ -1608,7 +1610,7 @@ static int depmod_calculate_dependencies(struct depmod *depmod)
roots = users + n_mods;
sorted = roots + n_mods;
- DBG("calculate dependencies and ordering (%zd modules)\n", n_mods);
+ DBG("calculate dependencies and ordering (%hu modules)\n", n_mods);
assert(depmod->modules.count < UINT16_MAX);
@@ -1649,7 +1651,7 @@ static int depmod_calculate_dependencies(struct depmod *depmod)
}
if (n_sorted < n_mods) {
- WRN("found %hu modules in dependency cycles!\n",
+ WRN("found %u modules in dependency cycles!\n",
n_mods - n_sorted);
for (i = 0; i < n_mods; i++) {
struct mod *m;
@@ -1665,7 +1667,7 @@ static int depmod_calculate_dependencies(struct depmod *depmod)
depmod_sort_dependencies(depmod);
- DBG("calculated dependencies and ordering (%u loops, %zd modules)\n",
+ DBG("calculated dependencies and ordering (%u loops, %hu modules)\n",
depmod->dep_loops, n_mods);
free(users);
@@ -2226,9 +2228,9 @@ static int depmod_output(struct depmod *depmod, FILE *out)
static void depmod_add_fake_syms(struct depmod *depmod)
{
/* __this_module is magic inserted by kernel loader. */
- depmod_symbol_add(depmod, "__this_module", 0, NULL);
+ depmod_symbol_add(depmod, "__this_module", true, 0, NULL);
/* On S390, this is faked up too */
- depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", 0, NULL);
+ depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
}
static int depmod_load_symvers(struct depmod *depmod, const char *filename)
@@ -2269,7 +2271,7 @@ static int depmod_load_symvers(struct depmod *depmod, const char *filename)
continue;
}
- depmod_symbol_add(depmod, sym, crc, NULL);
+ depmod_symbol_add(depmod, sym, false, crc, NULL);
}
depmod_add_fake_syms(depmod);
@@ -2310,6 +2312,10 @@ static int depmod_load_system_map(struct depmod *depmod, const char *filename)
goto invalid_syntax;
p++;
+ /* skip prefix */
+ if (p[0] == depmod->cfg->sym_prefix)
+ p++;
+
/* Covers gpl-only and normal symbols. */
if (strncmp(p, ksymstr, ksymstr_len) != 0)
continue;
@@ -2318,7 +2324,7 @@ static int depmod_load_system_map(struct depmod *depmod, const char *filename)
if (end != NULL)
*end = '\0';
- depmod_symbol_add(depmod, p + ksymstr_len, 0, NULL);
+ depmod_symbol_add(depmod, p + ksymstr_len, true, 0, NULL);
continue;
invalid_syntax:
@@ -2351,7 +2357,7 @@ static int depfile_up_to_date_dir(DIR *d, time_t mtime, size_t baselen, char *pa
namelen = strlen(name);
if (baselen + namelen + 2 >= PATH_MAX) {
path[baselen] = '\0';
- ERR("path is too long %s%s %zd\n", path, name);
+ ERR("path is too long %s%s\n", path, name);
continue;
}
diff --git a/tools/insmod.c b/tools/insmod.c
index 427495a..a795d89 100644
--- a/tools/insmod.c
+++ b/tools/insmod.c
@@ -1,7 +1,7 @@
/*
* kmod-insmod - insert modules into linux kernel using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/tools/kmod.c b/tools/kmod.c
index 5a6bc14..347bb7d 100644
--- a/tools/kmod.c
+++ b/tools/kmod.c
@@ -1,7 +1,7 @@
/*
* kmod - one tool to rule them all
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,6 +37,7 @@ static const struct kmod_cmd kmod_cmd_help;
static const struct kmod_cmd *kmod_cmds[] = {
&kmod_cmd_help,
&kmod_cmd_list,
+ &kmod_cmd_static_nodes,
};
static const struct kmod_cmd *kmod_compat_cmds[] = {
diff --git a/tools/kmod.h b/tools/kmod.h
index 59a87e0..68a646a 100644
--- a/tools/kmod.h
+++ b/tools/kmod.h
@@ -1,7 +1,7 @@
/*
* kmod - one tool to rule them all
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,5 +35,6 @@ extern const struct kmod_cmd kmod_cmd_compat_modprobe;
extern const struct kmod_cmd kmod_cmd_compat_depmod;
extern const struct kmod_cmd kmod_cmd_list;
+extern const struct kmod_cmd kmod_cmd_static_nodes;
#include "log.h"
diff --git a/tools/log.c b/tools/log.c
index a28cebf..05f6b77 100644
--- a/tools/log.c
+++ b/tools/log.c
@@ -1,7 +1,7 @@
/*
* kmod - log infrastructure
*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,6 +60,7 @@ static _always_inline_ const char *prio_to_str(int prio)
return prioname;
}
+_printf_format_(6, 0)
static void log_kmod(void *data, int priority, const char *file, int line,
const char *fn, const char *format, va_list args)
{
diff --git a/tools/log.h b/tools/log.h
index fcd930a..d55a4c6 100644
--- a/tools/log.h
+++ b/tools/log.h
@@ -1,7 +1,7 @@
/*
* kmod - log infrastructure
*
- * Copyright (C) 2012 ProFUSION embedded systems
+ * Copyright (C) 2012-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
void log_open(bool use_syslog);
void log_close(void);
-void log_printf(int prio, const char *fmt, ...);
+void log_printf(int prio, const char *fmt, ...) _printf_format_(2, 3);
#define CRIT(...) log_printf(LOG_CRIT, __VA_ARGS__)
#define ERR(...) log_printf(LOG_ERR, __VA_ARGS__)
#define WRN(...) log_printf(LOG_WARNING, __VA_ARGS__)
diff --git a/tools/lsmod.c b/tools/lsmod.c
index d62b188..b00a9cd 100644
--- a/tools/lsmod.c
+++ b/tools/lsmod.c
@@ -1,7 +1,7 @@
/*
* kmod-lsmod - list modules from linux kernel using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/tools/modinfo.c b/tools/modinfo.c
index 17ed50d..9a60d71 100644
--- a/tools/modinfo.c
+++ b/tools/modinfo.c
@@ -1,7 +1,7 @@
/*
* kmod-modinfo - query kernel module information using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/tools/modprobe.c b/tools/modprobe.c
index 437dea3..6b34658 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -1,7 +1,7 @@
/*
* kmod-modprobe - manage linux kernel modules using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -142,6 +142,7 @@ static void help(void)
program_invocation_short_name, program_invocation_short_name);
}
+_printf_format_(1, 2)
static inline void _show(const char *fmt, ...)
{
va_list args;
@@ -385,7 +386,7 @@ static int rmmod_do_module(struct kmod_module *mod, bool do_dependencies)
goto error;
}
- if (!ignore_loaded) {
+ if (!ignore_loaded && !cmd) {
int usage = kmod_module_get_refcnt(mod);
if (usage > 0) {
@@ -495,8 +496,12 @@ static void print_action(struct kmod_module *m, bool install,
path = kmod_module_get_path(m);
if (path == NULL) {
- assert(kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN);
- printf("builtin %s\n", kmod_module_get_name(m));
+ /*
+ * Either a builtin module, or an alias, print only for
+ * builtin
+ */
+ if (kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN)
+ printf("builtin %s\n", kmod_module_get_name(m));
} else
printf("insmod %s %s\n", kmod_module_get_path(m), options);
}
diff --git a/tools/rmmod.c b/tools/rmmod.c
index 0495463..bf5a408 100644
--- a/tools/rmmod.c
+++ b/tools/rmmod.c
@@ -1,7 +1,7 @@
/*
* kmod-rmmod - remove modules from linux kernel using libkmod.
*
- * Copyright (C) 2011-2012 ProFUSION embedded systems
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,8 +62,14 @@ static void help(void)
static int check_module_inuse(struct kmod_module *mod) {
struct kmod_list *holders;
+ int state;
- if (kmod_module_get_initstate(mod) == -ENOENT) {
+ state = kmod_module_get_initstate(mod);
+
+ if (state == KMOD_MODULE_BUILTIN) {
+ ERR("Module %s is builtin.\n", kmod_module_get_name(mod));
+ return -ENOENT;
+ } else if (state < 0) {
ERR("Module %s is not currently loaded\n",
kmod_module_get_name(mod));
return -ENOENT;
diff --git a/tools/static-nodes.c b/tools/static-nodes.c
new file mode 100644
index 0000000..0195390
--- /dev/null
+++ b/tools/static-nodes.c
@@ -0,0 +1,276 @@
+/*
+ * kmod-static-nodes - manage modules.devname
+ *
+ * Copyright (C) 2004-2012 Kay Sievers <kay@vrfy.org>
+ * Copyright (C) 2011-2013 ProFUSION embedded systems
+ * Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <getopt.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/utsname.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include "libkmod-util.h"
+
+#include "kmod.h"
+
+struct static_nodes_format {
+ const char *name;
+ int (*write)(FILE *, char[], char[], char, unsigned int, unsigned int);
+ const char *description;
+};
+
+static const struct static_nodes_format static_nodes_format_human;
+static const struct static_nodes_format static_nodes_format_tmpfiles;
+static const struct static_nodes_format static_nodes_format_devname;
+
+static const struct static_nodes_format *static_nodes_formats[] = {
+ &static_nodes_format_human,
+ &static_nodes_format_tmpfiles,
+ &static_nodes_format_devname,
+};
+
+static const char cmdopts_s[] = "o:f:h";
+static const struct option cmdopts[] = {
+ { "output", required_argument, 0, 'o'},
+ { "format", required_argument, 0, 'f'},
+ { "help", no_argument, 0, 'h'},
+ { },
+};
+
+static int write_human(FILE *out, char modname[], char devname[], char type, unsigned int maj, unsigned int min)
+{
+ int ret;
+
+ ret = fprintf(out,
+ "Module: %s\n"
+ "\tDevice node: /dev/%s\n"
+ "\t\tType: %s device\n"
+ "\t\tMajor: %u\n"
+ "\t\tMinor: %u\n",
+ modname, devname,
+ (type == 'c') ? "character" : "block", maj, min);
+ if (ret >= 0)
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
+}
+
+static const struct static_nodes_format static_nodes_format_human = {
+ .name = "human",
+ .write = write_human,
+ .description = "(default) a human readable format. Do not parse.",
+};
+
+static int write_tmpfiles(FILE *out, char modname[], char devname[], char type, unsigned int maj, unsigned int min)
+{
+ const char *dir;
+ int ret;
+
+ dir = strrchr(devname, '/');
+ if (dir) {
+ ret = fprintf(out, "d /dev/%.*s 0755 - - -\n",
+ (int)(dir - devname), devname);
+ if (ret < 0)
+ return EXIT_FAILURE;
+ }
+
+ ret = fprintf(out, "%c /dev/%s 0600 - - - %u:%u\n",
+ type, devname, maj, min);
+ if (ret < 0)
+ return EXIT_FAILURE;
+
+ return EXIT_SUCCESS;
+}
+
+static const struct static_nodes_format static_nodes_format_tmpfiles = {
+ .name = "tmpfiles",
+ .write = write_tmpfiles,
+ .description = "the tmpfiles.d(5) format used by systemd-tmpfiles.",
+};
+
+static int write_devname(FILE *out, char modname[], char devname[], char type, unsigned int maj, unsigned int min)
+{
+ int ret;
+
+ ret = fprintf(out, "%s %s %c%u:%u\n", modname, devname, type, maj, min);
+ if (ret >= 0)
+ return EXIT_SUCCESS;
+ else
+ return EXIT_FAILURE;
+}
+
+static const struct static_nodes_format static_nodes_format_devname = {
+ .name = "devname",
+ .write = write_devname,
+ .description = "the modules.devname format.",
+};
+
+static void help(void)
+{
+ size_t i;
+
+ printf("Usage:\n"
+ "\t%s static-nodes [options]\n"
+ "\n"
+ "kmod static-nodes outputs the static-node information of the currently running kernel.\n"
+ "\n"
+ "Options:\n"
+ "\t-f, --format=FORMAT choose format to use: see \"Formats\"\n"
+ "\t-o, --output=FILE write output to file\n"
+ "\t-h, --help show this help\n"
+ "\n"
+ "Formats:\n",
+ program_invocation_short_name);
+
+ for (i = 0; i < ARRAY_SIZE(static_nodes_formats); i++) {
+ if (static_nodes_formats[i]->description != NULL) {
+ printf("\t%-12s %s\n", static_nodes_formats[i]->name,
+ static_nodes_formats[i]->description);
+ }
+ }
+}
+
+static int do_static_nodes(int argc, char *argv[])
+{
+ struct utsname kernel;
+ char modules[PATH_MAX], buf[4096];
+ const char *output = "/dev/stdout";
+ FILE *in = NULL, *out = NULL;
+ const struct static_nodes_format *format = &static_nodes_format_human;
+ int r, ret = EXIT_SUCCESS;
+
+ for (;;) {
+ int c, idx = 0, valid;
+ size_t i;
+
+ c = getopt_long(argc, argv, cmdopts_s, cmdopts, &idx);
+ if (c == -1) {
+ break;
+ }
+ switch (c) {
+ case 'o':
+ output = optarg;
+ break;
+ case 'f':
+ valid = 0;
+
+ for (i = 0; i < ARRAY_SIZE(static_nodes_formats); i++) {
+ if (streq(static_nodes_formats[i]->name, optarg)) {
+ format = static_nodes_formats[i];
+ valid = 1;
+ }
+ }
+
+ if (!valid) {
+ fprintf(stderr, "Unknown format: '%s'.\n",
+ optarg);
+ help();
+ ret = EXIT_FAILURE;
+ goto finish;
+ }
+ break;
+ case 'h':
+ help();
+ goto finish;
+ case '?':
+ ret = EXIT_FAILURE;
+ goto finish;
+ default:
+ fprintf(stderr, "Unexpected commandline option '%c'.\n",
+ c);
+ help();
+ ret = EXIT_FAILURE;
+ goto finish;
+ }
+ }
+
+ if (uname(&kernel) < 0) {
+ fputs("Error: uname failed!\n", stderr);
+ ret = EXIT_FAILURE;
+ goto finish;
+ }
+
+ snprintf(modules, sizeof(modules), "/lib/modules/%s/modules.devname", kernel.release);
+ in = fopen(modules, "re");
+ if (in == NULL) {
+ if (errno == ENOENT) {
+ fprintf(stderr, "Warning: /lib/modules/%s/modules.devname not found - ignoring\n",
+ kernel.release);
+ ret = EXIT_SUCCESS;
+ } else {
+ fprintf(stderr, "Error: could not open /lib/modules/%s/modules.devname - %m\n",
+ kernel.release);
+ ret = EXIT_FAILURE;
+ }
+ goto finish;
+ }
+
+ r = mkdir_parents(output, 0755);
+ if (r < 0) {
+ fprintf(stderr, "Error: could not create parent directory for %s - %m.\n", output);
+ ret = EXIT_FAILURE;
+ goto finish;
+ }
+
+ out = fopen(output, "we");
+ if (out == NULL) {
+ fprintf(stderr, "Error: could not create %s - %m\n", output);
+ ret = EXIT_FAILURE;
+ goto finish;
+ }
+
+ while (fgets(buf, sizeof(buf), in) != NULL) {
+ char modname[PATH_MAX];
+ char devname[PATH_MAX];
+ char type;
+ unsigned int maj, min;
+ int matches;
+
+ if (buf[0] == '#')
+ continue;
+
+ matches = sscanf(buf, "%s %s %c%u:%u", modname, devname,
+ &type, &maj, &min);
+ if (matches != 5 || (type != 'c' && type != 'b')) {
+ fprintf(stderr, "Error: invalid devname entry: %s", buf);
+ ret = EXIT_FAILURE;
+ continue;
+ }
+
+ format->write(out, modname, devname, type, maj, min);
+ }
+
+finish:
+ if (in)
+ fclose(in);
+ if (out)
+ fclose(out);
+ return ret;
+}
+
+const struct kmod_cmd kmod_cmd_static_nodes = {
+ .name = "static-nodes",
+ .cmd = do_static_nodes,
+ .help = "outputs the static-node information installed with the currently running kernel",
+};