Lucas De Marchi [Thu, 18 Oct 2012 04:36:33 +0000 (01:36 -0300)]
libkmod: cache open file for later access
If we are accessing several times the modules and reading some sections
by sucessive calls to the functions below, we are incurring in a penalty
of having to open, parse the header and close the file. For each
function.
- kmod_module_get_info()
- kmod_module_get_versions()
- kmod_module_get_symbols()
- kmod_module_get_dependency_symbols()
These functions are particularly important to depmod. It calls all of
them, for each module. Moreover there's a huge bottleneck in the open
operation if we are using compression. Every time we open the module we
need to uncompress the file and after getting the information we need we
discard the result. This is clearly shown by profiling depmod with perf
(record + report), using compressed modules:
64.07% depmod libz.so.1.2.7 [.] 0x00000000000074b8 ◆
18.18% depmod libz.so.1.2.7 [.] crc32 ▒
2.42% depmod libz.so.1.2.7 [.] inflate ▒
1.17% depmod libc-2.16.so [.] __memcpy_ssse3_back ▒
0.96% depmod [kernel.kallsyms] [k] copy_user_generic_string ▒
0.89% depmod libc-2.16.so [.] __strcmp_sse42 ▒
0.82% depmod [kernel.kallsyms] [k] hrtimer_interrupt ▒
0.77% depmod libc-2.16.so [.] _int_malloc ▒
0.44% depmod kmod-nolib [.] kmod_elf_get_strings ▒
0.41% depmod kmod-nolib [.] kmod_elf_get_dependency_symbols ▒
0.37% depmod kmod-nolib [.] kmod_elf_get_section ▒
0.36% depmod kmod-nolib [.] kmod_elf_get_symbols
...
Average of running depmod 5 times, dropping caches between them, in a
slow spinning disk:
Before: 12.25 +- 0.20
After: 8.20 +- 0.21
m-i-t: 9.62 +- 0.27
So this patch leads to an improvement of ~33% over unpatched version,
ending up with 15% speedup over module-init-tools.
Lucas De Marchi [Wed, 17 Oct 2012 21:32:56 +0000 (18:32 -0300)]
rmmod: Deprecate --wait option
Remove --wait from usage() and give a message + sleep(10) if user is in
fact using it.
Leandro Pereira [Fri, 12 Oct 2012 15:28:56 +0000 (12:28 -0300)]
libkmod-hash: Plug possible memory leak when free_value is defined
Although the hash table implementation allows passing a callback function
to free a value when it is removed from the hash table, hash_del() wasn't
freeing it if it was provided. Now it does.
As a bonus, it now checks if the callback is set in hash_add() as well.
Lucas De Marchi [Mon, 8 Oct 2012 22:04:16 +0000 (19:04 -0300)]
libkmod: Add support for '.' in module parameter on kcmdline
Otherwise we fail to parse arguments in kernel command line like
testmodule.testparam=1.5G
Suggested-by: Selim T. Erdogan <selim@alumni.cs.utexas.edu>
Lucas De Marchi [Thu, 4 Oct 2012 04:08:13 +0000 (01:08 -0300)]
testsuite: add depmod test for modules.alias
Check if modules.alias is correctly generated from modules.order if we
have compressed modules.
Lucas De Marchi [Thu, 4 Oct 2012 03:21:52 +0000 (00:21 -0300)]
testsuite: allow to check generated files
This gives the test cases the ability to supply files that must be
checked after the test is run, rather than just checking stdout/stderr.
This is intended to be used with tools that generate files, like depmod.
It includes a poor's man implementation of a "check for differences in
files". Not really optimized, but it's simple enough and does what it
proposes to.
Lucas De Marchi [Wed, 3 Oct 2012 19:28:24 +0000 (16:28 -0300)]
depmod: fix parsing of modules.order with compressed modules
We now index the modules by uncompressed-relative-path instead of
relative-path. This is because the file modules.order, coming from
kernel, always comes with uncompressed paths. This fixes the issue of
not sorting the aliases correctly due to paths not matching when using
compressed modules.
Dave Reisner [Thu, 27 Sep 2012 15:00:42 +0000 (11:00 -0400)]
build-sys: Remove --with-rootprefix option
This is a broken option that only leads to misery and incompatabilities
with other systems. Kbuild doesn't come close to supporting directories
other than /lib/modules with several targets simply failing without
hacky fixes. Simply remove the option and all traces of it, as it
doesn't make sense in today's world.
Lucas De Marchi [Fri, 14 Sep 2012 14:18:41 +0000 (11:18 -0300)]
build-sys: Append -Werror when testing flags
Clang doesn't treat unknown warnings flags as an error, but rather as a
warning. The result is that the detection for whic CFLAGS are supported
by this compiler will not work, since the compilation will succeed.
With this patch we now successfully detect clang doesn't support
-Wlogical-op, as opposed to previous behavior:
checking if clang supports flag -Wlogical-op in envvar CFLAGS... no
We use this macro only for LDFLAGS and CFLAGS, so it's safe to stash
-Werror there.
Jan Engelhardt [Thu, 13 Sep 2012 23:55:54 +0000 (01:55 +0200)]
NEWS: language corrections
Dave Reisner [Sat, 8 Sep 2012 16:22:11 +0000 (12:22 -0400)]
modinfo: clarify verbiage for field shortcuts
Cleanup the punctuation and grammar in this blurb, specifically pointing
out what these are shortcuts for.
Dave Reisner [Sat, 8 Sep 2012 15:43:54 +0000 (11:43 -0400)]
Makefile: remove redundant flags to $(RM)
$(RM) will always expand to 'rm -f' which means we don't need to ignore
errors or pass this flag again.
Dave Reisner [Sat, 8 Sep 2012 18:08:50 +0000 (14:08 -0400)]
Define rootfs as dependency of check-am
This should actually fix the problem of ensuring that the rootfs is
created every time that 'make check' is run.
Dave Reisner [Sat, 8 Sep 2012 15:50:56 +0000 (11:50 -0400)]
Revert "build-sys: disable jobserver for rootfs target"
This is bogus and does not work.
This reverts commit
4e7f0f204bc82ce749cad6613b066993f530cbe6.
Lucas De Marchi [Fri, 7 Sep 2012 17:59:35 +0000 (14:59 -0300)]
testsuite: Fix double definition of 64-bits variant
If _FILE_OFFSET_BITS is defined we should not be wrapping these 64
variants, since they are macros in libc.
Lucas De Marchi [Thu, 6 Sep 2012 19:26:53 +0000 (16:26 -0300)]
kmod 10
Lucas De Marchi [Fri, 31 Aug 2012 09:59:26 +0000 (06:59 -0300)]
Remove test directory
All tests should be in testsuite. The remaining tests in this directory
are not relevant enough to be ported. git log can be consulted if in
future we decide to put them in testsuite.
Lucas De Marchi [Thu, 30 Aug 2012 17:10:47 +0000 (14:10 -0300)]
TODO: deprecate use of rmmod -w
As discussed with Rusty Russel, it would be nice to remove the related
code from kernel. Deprecate its use on kmod, so people know they
shouldn't be using it.
Lucas De Marchi [Fri, 17 Aug 2012 12:42:47 +0000 (09:42 -0300)]
modprobe: Unconditionally use KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY
This fixes a change in behavior regarding kmod and module-init-tools:
when trying to load a module by alias, we should check if it's
blacklisted, regardless of the command line arguments passed.
This was reported by "Dmitry V. Levin <ldv@altlinux.org>".
Lucas De Marchi [Fri, 17 Aug 2012 12:38:05 +0000 (09:38 -0300)]
libkmod-module: Add KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY flag
With this flag kmod_module_probe_insert_module() check if module is
blacklisted only if it's also an alias. This is needed in order to allow
blacklisting a module by name and effectively blacklisting all its
aliases as module-init-tools was doing.
Before this patch we could load pcspkr module as follows:
/etc/modprobe.d/test.conf:
alias yay pcspkr
blacklist pcspkr
$ modprobe yay
Now libkmod has support to blacklist "yay" because "pcspkr" is blacklisted.
Martin Pitt [Wed, 1 Aug 2012 21:35:34 +0000 (23:35 +0200)]
testsuite preload: Factorize into macros, add more stat and open variants
Instead of replicating the same code several times, define and use macros for
the various types of wrapped functions in the testsuite's path.c LD_PRELOAD
wrapper.
Add various __xstat() variants and open64(), which are being used when enabling
large file support.
Lucas De Marchi [Tue, 31 Jul 2012 12:58:21 +0000 (09:58 -0300)]
README: let people know they don't need to subscribe
People are afraid to CC the mailing list because they think they need to
subscribe (and a lot of them are already subscribed to too many lists).
Lucas De Marchi [Tue, 31 Jul 2012 12:51:48 +0000 (09:51 -0300)]
build-sys: add 'man' entry in summary
Colin Walters [Mon, 30 Jul 2012 16:27:10 +0000 (12:27 -0400)]
build-sys: Add --disable-manpages option
1) Embedded systems often don't want man pages on the
target; rather than pointlessly building them, then ignoring
the result, allow just not building them at all
2) When bootstrapping an operating systems, documentation is the
source of many cyclical dependencies, and allowing it to
be explicitly disabled is useful for earlier build passes.
Dave Reisner [Wed, 25 Jul 2012 23:52:20 +0000 (19:52 -0400)]
man/rmmod: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:49:00 +0000 (19:49 -0400)]
man/depmod: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:45:46 +0000 (19:45 -0400)]
man/modprobe: specify each option in separate <term> tag
Dave Reisner [Wed, 25 Jul 2012 23:40:10 +0000 (19:40 -0400)]
man/modinfo: specify each option in separate <term> tag
This has the end result of comma delimiting equivalent options in the
manpage, similar to many other manuals.
Dave Reisner [Wed, 25 Jul 2012 23:36:40 +0000 (19:36 -0400)]
man/modinfo: document longopts for field shortcuts
Dave Reisner [Wed, 25 Jul 2012 23:29:40 +0000 (19:29 -0400)]
man/modinfo: document --basedir option
This was never documented in the manpage of module-init-tools either.
The flag is identical in function to modprobe's --dirname option, so use
the same language to describe it.
Dave Reisner [Wed, 25 Jul 2012 23:30:19 +0000 (19:30 -0400)]
man/modprobe: clarify --dirname option
The documentation for this flag leads one to believe that the full path
to the module directory is needed. In reality, this flag specifies only
the root of the module path.
Lucas De Marchi [Wed, 18 Jul 2012 13:19:48 +0000 (10:19 -0300)]
Use #pragma once instead of #ifndef
Only the public header maintains #ifndef in the header, together with
pragma. The other ones contain only pragma.
As reported by Shawn Landden on systemd mailing list this is compatible
with all major compilers and gcc has this since version 3.3.
Dave Reisner [Tue, 10 Jul 2012 13:32:12 +0000 (09:32 -0400)]
build-sys: disable jobserver for rootfs target
2588e3dff5d broke the distcheck target. Fix it by serializing the rootfs
(re)creation prior to running the testsuite.
Lucas De Marchi [Tue, 10 Jul 2012 12:42:24 +0000 (09:42 -0300)]
testsuite: re-license under LGPL
Martin Pitt [Tue, 10 Jul 2012 07:19:50 +0000 (09:19 +0200)]
testsuite: path wrapper: Fix open() with 3 arguments
Properly return the original libc return value in the case that open() is
called with 3 arguments.
Dave Reisner [Thu, 28 Jun 2012 13:09:48 +0000 (09:09 -0400)]
module: support reading coresize from /sys if supported
Linux 3.3 introduced the coresize attribute in /sys/module/*. When
available, use this instead of parsing some portion of /proc/modules.
Dave Reisner [Thu, 28 Jun 2012 15:16:36 +0000 (11:16 -0400)]
Implicitly run 'make rootfs' with 'make check'
Avoid the need for the user to run this manually after a run of the
testsuite by adding it.
Lucas De Marchi [Thu, 21 Jun 2012 14:30:56 +0000 (11:30 -0300)]
testsuite: use right offset for module name
We need to cope with the case in which a 32 bits machine is opening a 64
bits kernel module and vice-versa. The offset in `struct module' are
different and do not depend on the architecture we are running, but
rather on the architecture they were created for.
This fixes `make check' in 32 bits machines (since we are shipping 64
bits modules for testing)
Lucas De Marchi [Tue, 19 Jun 2012 22:46:53 +0000 (19:46 -0300)]
kmod 9
Lucas De Marchi [Tue, 19 Jun 2012 16:27:17 +0000 (13:27 -0300)]
build-sys: allow compressed modules in testsuite
Lucas De Marchi [Tue, 19 Jun 2012 16:09:23 +0000 (13:09 -0300)]
build-sys: Make dirs writable on rootfs creation
Autofoo make the dist dir as readonly. If we copy it, tools needing to
create sysfs entries will not be able to do so, because they can't
create the needed directories/files.
It would be much better if autofoo allowed to let the files as is
instead of converting them to read-only.
Lucas De Marchi [Sat, 16 Jun 2012 01:14:00 +0000 (22:14 -0300)]
depmod: use ferror and fclose to check for error
Thanks to hpa for point this out.
Dave Reisner [Fri, 8 Jun 2012 17:17:28 +0000 (13:17 -0400)]
bootstrap: remove unnecessary echo
Dave Reisner [Thu, 7 Jun 2012 23:49:16 +0000 (19:49 -0400)]
bootstrap-configure: quote command line arg expansion
Lucas De Marchi [Fri, 15 Jun 2012 23:13:31 +0000 (20:13 -0300)]
depmod: return error when index is truncated due to ENOSPC
Before:
=======
[lucas@vader kmod]$ sudo depmod
[lucas@vader kmod]$ echo $?
0
[lucas@vader kmod]$ ls -l /lib/modules/$(uname -r)
total 12
drwxr-xr-x 8 root root 160 Jun 13 11:05 kernel
-rw-r--r-- 1 root root 12288 Jun 15 21:29 modules.alias
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.alias.bin
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.dep
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.dep.bin
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.devname
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.softdep
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.symbols
-rw-r--r-- 1 root root 0 Jun 15 21:29 modules.symbols.bin
Note that modules.alias is truncated and the other have size == 0
After:
======
[lucas@vader kmod]$ sudo ./tools/depmod
WARNING: could not open /lib/modules/3.5.0-rc2-demarchi-00028-g94fa83c/modules.order: No such file or directory
ERROR: Could not create index: output truncated: No space left on device
[lucas@vader kmod]$ echo $?
1
Lucas De Marchi [Fri, 15 Jun 2012 04:10:14 +0000 (01:10 -0300)]
depmod: fix coding-style issue in array declaration
Lucas De Marchi [Fri, 15 Jun 2012 04:08:17 +0000 (01:08 -0300)]
depmod: fail if any index could not be created
Lucas De Marchi [Fri, 15 Jun 2012 05:39:34 +0000 (02:39 -0300)]
depmod: don't return error if modules.builtin don't exist
Lucas De Marchi [Fri, 15 Jun 2012 03:38:19 +0000 (00:38 -0300)]
Remove ifdef for building tools not bundled
Current build system do not support to build separate tools anymore, so
just remove the ifdefs.
Lucas De Marchi [Thu, 14 Jun 2012 19:58:46 +0000 (16:58 -0300)]
build-sys: add missing header to fix distcheck
Lucas De Marchi [Thu, 14 Jun 2012 19:29:28 +0000 (16:29 -0300)]
tools: rename source files
There's no point anymore in having "kmod-" prefix. This is a historical
thing when we started implementation of these tools.
Lucas De Marchi [Tue, 12 Jun 2012 04:43:46 +0000 (01:43 -0300)]
libkmod-config: refactor functions to get config
It makes more sense to have libkmod-config.c deal with the configuration
directly and the others get the config from ctx. As a bonus point we get
a smaller binary. Following numbers are for x86-64, libkmod + kmod:
Before:
text data bss dec hex filename
128840 1496 104 130440 1fd88 tools/modprobe
After:
text data bss dec hex filename
128392 1496 104 129992 1fbc8 tools/modprobe
Lucas De Marchi [Mon, 11 Jun 2012 15:00:19 +0000 (12:00 -0300)]
TODO: update tasks
- Remove dependency loop with install commands, since it's done
- Add reasoning behind API refactor
Lucas De Marchi [Wed, 6 Jun 2012 13:49:04 +0000 (10:49 -0300)]
testsuite: Fix test description
Lucas De Marchi [Wed, 6 Jun 2012 12:36:29 +0000 (09:36 -0300)]
libkmod-index: protect ourselves from corrupted indexes
If index is shorter than 12 bytes, we couldn't even read its header. Go
to error handling in this case.
Lucas De Marchi [Wed, 6 Jun 2012 04:44:23 +0000 (01:44 -0300)]
testsuite: add test for install-commands loop
This loop is similar to the one that comes with install rules of
alsa-utils package. It can be easily verified by reverting commit
abd5557 and running the testsuite.
Lucas De Marchi [Wed, 6 Jun 2012 04:42:30 +0000 (01:42 -0300)]
testsuite: allow to export custom env vars
Lucas De Marchi [Wed, 6 Jun 2012 04:03:15 +0000 (01:03 -0300)]
testsuite: add timeout for each test
Each test must run under 2 seconds. Ideally they should run in much less
than this; just give an arbitrary number so we don't wait forever in
case we reached an infinite loop somewhere.
Lucas De Marchi [Wed, 6 Jun 2012 03:39:43 +0000 (00:39 -0300)]
testsuite: create additional pipe to monitor child
Lucas De Marchi [Wed, 6 Jun 2012 00:02:11 +0000 (21:02 -0300)]
libkmod-util: split function for usec conversion
Lucas De Marchi [Mon, 4 Jun 2012 23:45:24 +0000 (20:45 -0300)]
testsuite: add test for softdep loops
Lucas De Marchi [Tue, 5 Jun 2012 03:53:15 +0000 (00:53 -0300)]
testsuite: check if module is in kernel for return code
Lucas De Marchi [Tue, 5 Jun 2012 03:20:42 +0000 (00:20 -0300)]
testsuite: set default init_module behavior to mimic kernel's
Lucas De Marchi [Fri, 25 May 2012 03:30:37 +0000 (00:30 -0300)]
testsuite: create initstate file upon fake init_module()
Lucas De Marchi [Thu, 24 May 2012 06:29:05 +0000 (03:29 -0300)]
testsuite: add mkdir_p implementation
Lucas De Marchi [Thu, 24 May 2012 04:58:54 +0000 (01:58 -0300)]
testsuite: trap calls to mkdir
Lucas De Marchi [Thu, 24 May 2012 04:31:36 +0000 (01:31 -0300)]
testsuite: check if rootfs dir is dirty before running
Keep around a stamp-rootfs file that is generated together with the
rootfs. testsuite checks each test directory if its mtime is greater
than stamp's mtime, deciding if rootfs should be re-generated.
Lucas De Marchi [Fri, 25 May 2012 03:24:58 +0000 (00:24 -0300)]
testsuite: separate insert and delete rootfs from modinfo
Lucas De Marchi [Thu, 24 May 2012 04:19:20 +0000 (01:19 -0300)]
libkmod-util: add missing stdbool.h include
Lucas De Marchi [Thu, 24 May 2012 02:04:44 +0000 (23:04 -0300)]
testsuite: rename rootfs dir
Lucas De Marchi [Thu, 24 May 2012 02:05:04 +0000 (23:05 -0300)]
build-sys: provide --sysconfdir to make distcheck flags
test-blacklist is accessing the wrong location in make distcheck, making
the test to fail. Fix is by providing --sysconfdir=/etc in configure
flags.
Lucas De Marchi [Tue, 5 Jun 2012 03:07:38 +0000 (00:07 -0300)]
testsuite: fix find_module() finding wrong module
Lucas De Marchi [Wed, 23 May 2012 23:28:53 +0000 (20:28 -0300)]
Silence clang warnings with __unused__ attribute
I hate this kind of READV and WRITEV macros that Gustavo seems to love.
clang-analyzer hates them as well.
I'm not motivated enough to refactor this, but I want a clean clang
report, so just shut it up.
Lucas De Marchi [Wed, 23 May 2012 23:27:23 +0000 (20:27 -0300)]
Don't use __ for attribute defines
System headers use __, don't mess with them.
Lucas De Marchi [Wed, 23 May 2012 22:32:58 +0000 (19:32 -0300)]
libkmod-index: use generic function for unaligned access
Josh Boyer [Wed, 23 May 2012 18:31:07 +0000 (14:31 -0400)]
doc: Don't reference /etc/modprobe.conf
kmod doesn't read /etc/modprobe.conf at all, so don't mention it in the
modprobe man page. Point users to modprobe.d(5) instead.
Lucas De Marchi [Mon, 21 May 2012 23:43:39 +0000 (20:43 -0300)]
libkmod-hash: use generic function for unaligned access
Lucas De Marchi [Mon, 21 May 2012 23:22:12 +0000 (20:22 -0300)]
libkmod-util: copy macros for unaligned access from BlueZ
Mike Frysinger [Tue, 15 May 2012 22:29:44 +0000 (19:29 -0300)]
libkmod: move function to the only file using it
If we don't have --gc-sections support, linking kmod fails:
libkmod/.libs/libkmod-util.a(libkmod-util.o): In function 'underscores':
libkmod/libkmod-util.c:117: undefined reference to 'kmod_log'
This is because libkmod-util.la uses kmod_log(), that is in libkmod.la.
Move the function so we don't have a dependency loop while building the
libraries and it works with compilers with no support for --gc-sections.
Dan McGee [Thu, 23 Feb 2012 05:56:59 +0000 (23:56 -0600)]
test-conversion: convert test-get-dependencies to new infrastructure
The test uses the ext4 module dependencies as the testcase, checking
both the number and the names of the returned modules.
Dan McGee [Thu, 23 Feb 2012 05:56:58 +0000 (23:56 -0600)]
test-conversion: convert test-blacklist to new infrastructure
Add a modprobe.conf with some blacklist entries in a test rootfs, and
then ensure our blacklist function actually cuts out the two listed
entries (and doesn't cut out the others).
Lucas De Marchi [Fri, 11 May 2012 03:04:59 +0000 (00:04 -0300)]
build-sys: copy rootfs to another directory
We can't use the rootfs directory because it breaks out-of-tree build
and in future we want to make modifications to the fake filesystem such
as adding and removing files.
We need to call "chmod -R +w" in the resulting directory because when we
distribute the source with make dist all files will be readonly.
Fix 'make distcheck'
Lucas De Marchi [Fri, 11 May 2012 02:42:41 +0000 (23:42 -0300)]
build-sys: distribute testsuite
Fix 'make dist'
Dan McGee [Fri, 3 Feb 2012 19:24:18 +0000 (13:24 -0600)]
testsuite: ship testsuite/rootfs unzipped
The current configuration is dumb in any number of ways:
1) If the rationale was for space savings, it works the opposite- the
git repo gets more bloated because we are adding binary compressed
blobs that share little in common with their parent, and anyone that
wants to run the test suite has to unzip it anyway.
2) It is a pain in the butt to add new tests, and not accidentally lose
any new rootfs you built in the directory.
3) `git status` won't help you if you are tweaking files in the rootfs
and don't know they have been changed, or if some test did that and
you couldn't detect it.
4) `git log` won't help you find out what is changing in the rootfs test
directory itself when changes are made to the binary blob, such as
new files being added or even existing files being tweaked.
5) The files just aren't that big anyway- 2.7MB unzipped.
Lucas De Marchi [Fri, 11 May 2012 00:11:27 +0000 (21:11 -0300)]
build: remove private symbol from linker script
There's no reason kmod_log should be exported, remove it from linker
script. This doesn't break the API/ABI because we are luck: since the
function had visibility=hidden it was not getting exported as a global
symbol.
Lucas De Marchi [Thu, 10 May 2012 23:58:46 +0000 (20:58 -0300)]
Revert "libkmod: make sure to export kmod_log"
This reverts commit
88a170dbd63965b8403b6b40b12ded4f82d89ccd.
There's no reason for users of the API to call this method, it's just
wrong to export it.
The bug that this patch fixed needs to be fixed another way, not
exporting this function.
Dave Reisner [Mon, 7 May 2012 23:41:42 +0000 (19:41 -0400)]
depmod: report failures in loading symbols
Previously, depmod would relegate failures of kmod_module_get_symbols()
to debug output, assuming the "error" was simply a lack of symbols.
Leave the ENOENT return to debug output, but report anything else as a
real error.
Dave Reisner [Mon, 7 May 2012 23:41:41 +0000 (19:41 -0400)]
libkmod-file: gracefully handle errors from zlib
zlib won't necessarily set the system errno, and this is particularly
evident on corrupted data (which results in a double free). Use zlib's
gzerror to detect the failure, returning a generic EINVAL when zlib
doesn't provide us with an errno.
Lucas De Marchi [Thu, 26 Apr 2012 14:42:27 +0000 (11:42 -0300)]
Remove dead increment
Lucas De Marchi [Thu, 26 Apr 2012 14:40:26 +0000 (11:40 -0300)]
Return error instead of always 0
Lucas De Marchi [Thu, 26 Apr 2012 14:39:54 +0000 (11:39 -0300)]
Remove dead assignment
Mike Frysinger [Sat, 21 Apr 2012 06:53:23 +0000 (02:53 -0400)]
libkmod: make sure to export kmod_log
If we don't have --gc-sections support, linking kmod fails:
libkmod/.libs/libkmod-util.a(libkmod-util.o): In function 'underscores':
libkmod/libkmod-util.c:117: undefined reference to 'kmod_log'
This is because kmod_log is missing the export define, even though it's
already listed in the exported symbol list.
Lucas De Marchi [Thu, 19 Apr 2012 14:21:00 +0000 (11:21 -0300)]
kmod 8
Lucas De Marchi [Thu, 19 Apr 2012 14:08:24 +0000 (11:08 -0300)]
doc: remove links to NULL going nowhere
Lucas De Marchi [Mon, 16 Apr 2012 23:20:48 +0000 (20:20 -0300)]
TODO: add item to implement actions in kmod
Dave Reisner [Mon, 16 Apr 2012 14:37:32 +0000 (10:37 -0400)]
modprobe: handle -ENOENT return from init_module
init_module returns -ENOENT when the module failed to load because of a
bad parameter or unknown symbol. Throw a more descriptive error message
than the generic "No such file or directory" to alert the user.
Fixes Debian bug 668216.
Kay Sievers [Sat, 14 Apr 2012 18:47:47 +0000 (20:47 +0200)]
doc: silent man page generation and fix gtk-doc warnings
Elan Ruusamäe [Thu, 22 Mar 2012 15:00:16 +0000 (12:00 -0300)]
modprobe: fix typo in config dump: option->options
kmod uses "option MODNAME", not "options MODNAME"
--- modprobe-sorted.kmod 2012-03-21 22:31:03.
751754042 +0200
+++ modprobe-sorted.module-init-tools 2012-03-21 22:30:49.
561753089 +0200
@@ -1,6 +1,23 @@
[...]
-option uvesafb mode_option=1024x786-32 mtrr=4 scroll=ywrap
+options uvesafb mode_option=1024x786-32 mtrr=4 scroll=ywrap
This breaks scripts that depend in modprobe -c output grepping
Lucas De Marchi [Thu, 22 Mar 2012 01:26:03 +0000 (22:26 -0300)]
README: note that there are more files to read
Lucas De Marchi [Mon, 19 Mar 2012 11:23:14 +0000 (08:23 -0300)]
kmod 7