Commit Graph

186 Commits

Author SHA1 Message Date
Lucas De Marchi cc833644b2 rmmod: Deprecate --wait option
Remove --wait from usage() and give a message + sleep(10) if user is in
fact using it.
2012-10-17 18:43:17 -03:00
Lucas De Marchi 88c247f7f1 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.
2012-10-03 16:29:36 -03:00
Dave Reisner c5b37dba89 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.
2012-10-02 00:27:31 -03:00
Lucas De Marchi 36ddee6562 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>".
2012-08-17 09:42:47 -03:00
Lucas De Marchi e8fd8fec23 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.
2012-07-18 10:31:50 -03:00
Lucas De Marchi 3f376cd877 depmod: use ferror and fclose to check for error
Thanks to hpa for point this out.
2012-06-15 22:14:00 -03:00
Lucas De Marchi a4fb97a71e 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
2012-06-15 21:31:05 -03:00
Lucas De Marchi 015946da0c depmod: fix coding-style issue in array declaration 2012-06-15 03:04:28 -03:00
Lucas De Marchi 80e49ad988 depmod: fail if any index could not be created 2012-06-15 02:42:39 -03:00
Lucas De Marchi c5db1a3fd2 depmod: don't return error if modules.builtin don't exist 2012-06-15 02:42:25 -03:00
Lucas De Marchi ccd6afa4f2 Remove ifdef for building tools not bundled
Current build system do not support to build separate tools anymore, so
just remove the ifdefs.
2012-06-15 00:40:14 -03:00
Lucas De Marchi ac78e109c3 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.
2012-06-14 16:29:28 -03:00
Dave Reisner 819f79a24d 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.
2012-05-08 10:22:14 -03:00
Lucas De Marchi 20c6e18c37 Return error instead of always 0 2012-04-26 11:40:26 -03:00
Lucas De Marchi 18a492e6f7 Remove dead assignment 2012-04-26 11:39:54 -03:00
Dave Reisner ccb64d1ead 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.
2012-04-16 10:37:32 -04:00
Elan Ruusamäe 02629fa02e 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
2012-03-22 12:00:16 -03:00
Lucas De Marchi ae7ebe8770 modprobe: set log prio to 0 if user passed -q arg 2012-03-15 01:16:54 -03:00
Lucas De Marchi 23ea575014 Merge branch 'master' of git://code.falconindy.com/kmod 2012-03-15 00:31:22 -03:00
Lucas De Marchi c1b84540bb modprobe: always try to remove all modules in command line 2012-03-15 00:27:18 -03:00
Lucas De Marchi 4744ebcef4 modprobe: don't check if module builtin to decide if it's builtin
More or less confusing message, but if module is builtin in the live
system, it doesn't mean it's builtin in the target kernel.

Instead we now check if module has a path. It don't have a path only if
it's builtin in the target or if it doesn't exist at all. The latter
should not be a problem since this code is being called from inside the
library. Anyway, put an assert to make sure we get bug reports if any
case slipped in here.
2012-03-15 00:14:35 -03:00
Dave Reisner f758caf57c modprobe: fix error path in removing modules
We really haven't paid this code much attention, and it's somewhat
evident in our divergence in behavior from module-init-tools. This patch
asserts the following behavior on exit:

* modprobe -r realmod_notloaded => exit zero
* modprobe -r --first-time realmod_notloaded => exit non-zero
* modprobe -r bogusmod => exit non-zero
2012-03-14 22:26:30 -04:00
Dave Reisner aa5da52c3b modprobe: show builtin label on --show-depends
Previously, we didn't handle builtins very well, displaying things like:

$ modprobe -D btrfs
insmod /lib/modules/3.2.6-foo/kernel/crypto/crc32c.ko.gz
insmod (null)
insmod /lib/modules/3.2.6-foo/kernel/lib/libcrc32c.ko.gz
insmod /lib/modules/3.2.6-foo/kernel/lib/zlib_deflate/zlib_deflate.ko.gz
insmod /lib/modules/3.2.6-foo/kernel/fs/btrfs/btrfs.ko.gz

Follow module-init-tools and show builtins with the label 'builtin' and
their name:

$ modprobe -D btrfs
insmod /lib/modules/3.2.6-foo/kernel/crypto/crc32c.ko.gz
builtin intel_crc32c
insmod /lib/modules/3.2.6-foo/kernel/lib/libcrc32c.ko.gz
insmod /lib/modules/3.2.6-foo/kernel/lib/zlib_deflate/zlib_deflate.ko.gz
insmod /lib/modules/3.2.6-foo/kernel/fs/btrfs/btrfs.ko.gz
2012-02-27 18:49:36 -03:00
Dave Reisner 3e4c6af6ad modinfo: use new apply_filter method to avoid builtins 2012-02-24 10:53:42 -05:00
Dan McGee a23f0c9c55 modinfo: handle arguments more carefully
A simple case of breakage before this commit:

    $ touch aes
    $ modinfo aes
    filename:       /tmp/aes
    ERROR: could not get modinfo from 'aes': Invalid argument

Add a new is_module_filename() function that attempts to do more than
just check if the passed argument is a regular file. We look at the name
for a '.ko' string, and if that is found, ensure it is either at the end
of the string or followed by another '.' (for .gz and .xz modules, for
instance). We don't make this second option conditional on the way the
tools are built with compression support; the file is a module file
regardless and should always be treated that way.

When doing this, and noticed in the test suite output, we open the
system modules index unconditionally, even if it is never going to be
used during the modinfo call, which is the case when passing module
filenames directly. For only one module there's not much advantage in
pre-loading the index, so just remove the call to kmod_load_resources().

With-help-from: Dave Reisner <dreisner@archlinux.org>
[lucas.demarchi@profusion.mobi: remove call to kmod_load_resources()]
2012-02-06 20:29:08 -02:00
Lucas De Marchi 814a57babf libkmod-module: probe: rename flag to be more meaningful 2012-02-06 12:46:39 -02:00
Dan McGee 2ec79834a3 Update .gitignore files
Add kmod-* prefixed tool names, add 'tags' in root directory (for ctags,
matches cscope.out ignore already in there), and prefix tools/ entries
with '/' so they are absolute ignores and don't apply to subdirectories.
2012-02-05 02:15:20 -02:00
Khem Raj 035cbdc763 depmod: Dont use errno unconditionally
fopen() will not reset errno if it succeeds so we should
make sure that we only use errno in error cases.

Also fix the diagnostic messages to not use strerror
when there is no error since strerror will not return
anything useful in this case
2012-02-03 14:52:59 -02:00
Dave Reisner 1505ee9793 modprobe: avoid breaking on insertion failure 2012-02-03 09:10:13 -05:00
Dave Reisner 297a3182e4 modprobe: properly handle errors from init_module
Effectively catch and the zero and non-zero cases and error out
appropriately. Note that -EEXIST will only ever be returned when
KMOD_PROBE_STOP_ON_ALREADY_LOADED is set as a probe_insert_module flag.
2012-01-31 14:08:57 -02:00
Dave Reisner 69a1974347 modprobe: post-remove module deps with 0 refcnt
This commit looks shockingly similar to 0e9bd2d1 because SOMEONE decided
to remove it in a872bba in a glorious frenzy of refactoring.
2012-01-31 14:08:57 -02:00
Lucas De Marchi 2e9dcd742e kmod-modprobe: migrate to kmod_module_probe_insert_module() 2012-01-31 14:08:57 -02:00
Lucas De Marchi 28f32c65ca modprobe: print end of configuration files 2012-01-27 23:56:46 -02:00
Lucas De Marchi 3ef848b28b modprobe: fix build 'cause of excessive number of arguments 2012-01-26 16:03:47 -02:00
Dave Reisner cc98830ca4 modprobe: remove code referring to -t, --type
This was only useful with the --list function, which isn't implemented.
2012-01-26 15:07:09 -02:00
Lucas De Marchi fe8b0671a0 build-sys: do not create symlinks by default
Distro packagers should create them instead. It's too much trouble to
create them in the build system and every distro wants a different path
for them.
2012-01-21 18:01:00 -02:00
Lucas De Marchi 569f1609bd modprobe: kill operations depending on path
It was not on module-init-tools and it doesn't make much sense. It will
deal with dependencies, but looking at modules in the index. This might
not be the module we want if we are loading another from outside of the
tree.

Dealing with paths causes this bug (supposing there's a module names
squashfs):

	# cd /
	# touch squashfs
	# modprobe squashfs

That is because it detects that squashfs exists as a file and it will
try to load it instead of the alias "squashfs".

If you need to load a module from a path, use insmod.

Thanks to Silvan Calarco <silvan.calarco@mambasoft.it> who reported the
bug and helped debugging it.
2012-01-21 02:47:08 -02:00
Lucas De Marchi 411d83c41e Add program to calculate the shortest relative path for symlinks 2012-01-18 19:48:16 -02:00
Thierry Vignaud eff917c0d2 WEXITSTATUS is defined in sys/wait.h
Fix compiling with dietlibc:

../libkmod/libkmod-module.c:858:2: warning: implicit declaration of function 'WEXITSTATUS' [-Wimplicit-function-declaration]
../libkmod/libkmod-module.c:858:2: warning: nested extern declaration of 'WEXITSTATUS' [-Wnested-externs]
(...)
kmod-modprobe.c:(.text.command_do+0x157): undefined reference to `WEXITSTATUS'
2012-01-17 17:33:07 -02:00
Lucas De Marchi 09e9ae58b6 modprobe: flush stdout before dumping indexes
Index dump doesn't use stdio.h function and instead call write()
directly on STDOUT_FILENO file descriptor. Therefore we need to flush
stdio buffers before calling it, to be sure the configuration dump will
appear before index's.
2012-01-17 10:11:03 -02:00
Lucas De Marchi b8542a82b7 Fix common misspelling with codespell
-------8<-------
SUMMARY:
ommitted      1
2012-01-16 23:03:33 -02:00
Lucas De Marchi 49a163759d modprobe: dump indexes as well 2012-01-16 16:05:47 -02:00
Lucas De Marchi e15a56af85 depmod: deal with relative root dir
module paths coming from libkmod are absolute. Make sure we store the
absolute dirname to compare later.
2012-01-14 02:46:58 -02:00
Lucas De Marchi 33557e8d69 depmod: fix idx calculation after postponed array creation
We need to set up each module's idx when the array is created. So,
postpone its initialization as well.
2012-01-14 02:07:14 -02:00
Lucas De Marchi 31f1d0d306 Reduce scope of counter variable 2012-01-14 02:04:31 -02:00
Lucas De Marchi f6b838e1ba depmod: adhere to coding style 2012-01-14 02:03:21 -02:00
Lucas De Marchi bc43496a87 modprobe: dump configuration 2012-01-13 11:12:41 -02:00
Lucas De Marchi 8b01376742 modprobe: abort on dependency loop that cannot be broken 2012-01-12 17:14:30 -02:00
Lucas De Marchi e4e1e64ab0 modprobe: fix leak on error path 2012-01-12 15:37:57 -02:00
Lucas De Marchi a872bba22d modprobe: rework module removal without tree traversing
Just like the module insertion, module removal is remade.

The dependencies line that comes from modules.dep already contains all
the dependencies necessary to remove that module. Therefore modprobe
doesn't have to do the recursion between the modules in order to remove
it. All we have to do is to remove in order:

For the module being removed:
----------------------------

1. softdeps (in reverse order)
2. deps (in reverse order)
3. module
4. postdeps (in reverse order)

For any of the dependencies:
----------------------------

1. softdeps (in reverse order)
2. module
3. softdeps (in reverse order)
2012-01-12 15:23:51 -02:00
Lucas De Marchi 0cf2832a31 modprobe: rework module insertion without tree traversing
The dependencies line that comes from modules.dep already contains all
the dependencies necessary to insert that module. Therefore modprobe
doesn't have to do the recursion between the modules in order to load a
module. All we have to do is to load in order:

For the module being loaded:
----------------------------

1. softdeps
2. deps
3. module
4. postdeps

For any of the dependencies:
----------------------------

1. softdeps
2. module
3. softdeps
2012-01-12 14:34:19 -02:00
Lucas De Marchi 92122614b2 modprobe: show if module is in kernel
Now with './tools/modprobe --show-depends ahci' (ahci is builtin) we have the following
output:

$ ./tools/modprobe --show-depends ahci
builtin ahci

Just like modprobe from m-i-t. Previously we had:

$ ./tools/modprobe --show-depends ahci
FATAL: Module ahci not found.
2012-01-11 21:54:25 -02:00
Jan Alexander Steffens (heftig) 00bd319113 depmod: Postpone creation of module array
Deleting modules (we have found replacements) invalidates the indices
because the array collapses removed elements, hitting the assertion.

Since we don't make use of the array until the sorting step, build it from
the modules_by_name hash instead.
2012-01-11 20:35:18 -02:00
Lucas De Marchi af0ff2f22a modprobe: break dependency loop by checking if module is loaded
modprobe doesn't have support for handling dependency loop. That happens
with poorly written softdeps that can introduce a loop. We must deal
with them like it's being done in libkmod.

However, we can break a dependency loop when the dependency was already
inserted. This commit fixes this issue, that happens in the following
scenario:

dependencies:
-------------

modA:
modB: modA
modC: modA

config:

softdep modA post: modB modC

This creates the following loop:

modA
    inserted ok
    handle post-soft-deps of modA -> modB modC
        modB
            handle dependencies of modB -> modA
                modA is already inserted
                    handle post-soft-deps of modA -> modB modC

And so on and so forth.

Now we break the loop by checking if module is already inserted, before
handling it. Thus this gives us:

modA
    inserted ok
    handle post-soft-deps of modA -> modB modC
        modB
            handle dependencies of modB -> modA
                modA is already inserted
            inserted ok
        modC
            handle dependencies of modC -> modA
                modA is already inserted
            inserted ok
2012-01-11 18:29:55 -02:00
Lucas De Marchi 8f1922101e modprobe: adhere do coding style 2012-01-11 15:48:20 -02:00
Dave Reisner 6da9cdf1f7 rmmod: behavior more like m-i-t's rmmod
In line with m-i-t's behavior, we should check to see if each module is:

- loaded
- has any holders
- has a 0 refcnt

Detecting any of these lets us provide a more useful message than the
kernel's EPERM response to delete_module(2).

Additionally, alter the main loop behavior to avoid exiting early on the
first error.
2012-01-10 22:35:18 -05:00
Dave Reisner b54f1bf06a modprobe: check for EPERM on insertion
Throw an appropriate error when an unprivileged user attempts to load a
module.
2012-01-10 22:33:05 -05:00
Lucas De Marchi 0b22179acd build-sys: workaround libtool issue with argv[0]
Symlinking tools to kmod doesn't work because argv[0] is not the name of
the symlink, but rather 'kmod' (since libtool's wrapper script calls the
tools/.libs/kmod directly)

Now we create another binary kmod-nolib that is statically linked to
libkmod so we can call the binary directly and do not worry about
LD_LIBRARY_PATH.
2012-01-10 15:31:58 -02:00
Lucas De Marchi 00fc926cd8 build-sys: create symlinks instead of building separate tools 2012-01-10 15:31:58 -02:00
Lucas De Marchi a66a6a999f Update copyright 2012-01-09 00:41:07 -02:00
Lucas De Marchi cb0d0b7212 modprobe: fix error path when loading dependencies
demarchi> scenario is the following:
demarchi> modA depends on modB and modC
demarchi> if there's a race when trying to insert a dependency of a module, say
          modB, it will stop loading all the modules
demarchi> it should check by "module already loaded error"
demarchi> like it does for modA
2012-01-08 18:08:05 -02:00
Gustavo Sverzut Barbieri 525fa07b8f modprobe: show is independent from verbose level.
"modprobe --quiet --show-depends" now works.
2012-01-08 14:32:23 -02:00
Lucas De Marchi 6daceb2f1f Replace NAME_MAX with PATH_MAX for module aliases
Module aliases can be bigger than NAME_MAX. So, replace with PATH_MAX
that is bigger enough to hold them.

Technically in some places NAME_MAX would be sufficient (those using
module names only), but they use functions that can be called with
alias. So increase the buffers in these cases to PATH_MAX too.
2012-01-08 01:02:29 -02:00
Rolf Eike Beer 55021bed20 tools/kmod-depmod: fix aliasing warning 2012-01-06 10:47:47 -02:00
Lucas De Marchi 3f1e970b5a Revert "tools/kmod-depmod: fix aliasing warning"
This reverts commit f63fc9e606. Wrong
author name. I'll apply it again later.
2012-01-06 10:44:45 -02:00
root f63fc9e606 tools/kmod-depmod: fix aliasing warning 2012-01-06 10:39:39 -02:00
Dave Reisner 7f37491375 tools/modprobe: exit non-zero on module not found with --all 2012-01-06 02:33:58 -02:00
Dave Reisner 5f85a133f8 tools/modinfo: exit non-zero on module not found 2012-01-06 02:32:28 -02:00
Lucas De Marchi aa156c9860 tools: use basename in help message 2012-01-05 08:16:28 -02:00
Lucas De Marchi 56406fdb0a kmod-depmod: demote messages to WRN when non-critical files are missing 2012-01-04 21:02:20 -02:00
Dave Reisner 6369837707 tools: unify error verbiage and casing
Fix a typo and ensure that we always use "could not" instead of "Could
not" or the conjunction "couldn't".
2012-01-04 10:59:03 -05:00
Gustavo Sverzut Barbieri 3db5bf9d38 kmod-depmod: fix replacement of existing modules.
We cannot create a kmod_module for existing module name, it will fail
due existing in the hash table "modules_by_name".

To avoid it, we first delete the existing module, if lower priority,
then add the new one.

kmod_module_new_from_path() is called only when the former module was
deleted or does not exist.
2012-01-03 16:14:57 -02:00
Gustavo Sverzut Barbieri 026c7b448d kmod-depmod: fix comparison of module priority.
This code was never tested, my bad!

 * the prefix should be ignored, as it is not stored in cfg_search/override.

 * baselen should not include '/'.

 * search length should not include '\0'.

 * override path should not include cfg->dirname prefix.
2012-01-03 16:10:17 -02:00
Gustavo Sverzut Barbieri 8ea02fe056 kmod-depmod: fix incorrect math finding out end of dirname. 2012-01-03 15:11:58 -02:00
Gustavo Sverzut Barbieri 5988652597 kmod-depmod: document --config/-C in help output. 2012-01-03 15:06:08 -02:00
Gustavo Sverzut Barbieri b0bcadd0ae kmod-depmod: add missing trailing \n to log messages. 2012-01-03 15:04:34 -02:00
Lucas De Marchi d8a6c0ccb8 kmod-modprobe: mimic modprobe when removing deps with usecount=0 2012-01-01 06:13:09 -02:00
Lucas De Marchi c9a144481d Fix leak of kmod_module and fix code style 2012-01-01 06:12:59 -02:00
Dave Reisner 0e9bd2d1ca kmodprobe: post-remove module deps with 0 refcnt 2011-12-31 18:21:00 -05:00
Dave Reisner d98880ad5c modprobe: use lighter access call instead of stat 2011-12-31 18:02:30 -05:00
Dave Reisner b09668cf64 modprobe: remove --list option
This was marked as deprecated in m-i-t's modprobe in favor of find and
basename.
2011-12-31 16:51:40 -05:00
Lucas De Marchi 0c010fae10 Move libkmod-util.c to convenience util lib
Share more code between tools and libkmod. underscores() in kmod-depmod
can not use the same function as in the lib, so rename it.
2011-12-28 13:33:26 -02:00
Lucas De Marchi 6670c63344 Move array implementation from depmode to libkmod-util 2011-12-28 12:58:47 -02:00
Lucas De Marchi f6cf14ce13 tools: kmod: bundle depmod together with the others 2011-12-27 19:56:33 -02:00
Lucas De Marchi bcb812275e Fix header guard 2011-12-27 19:53:38 -02:00
Leandro Pereira 4783d69e48 kmod tool: don't keep iterating when command has been executed 2011-12-27 19:46:44 -02:00
Lucas De Marchi 5cd13064ec kmod-depmod: use hash implementation from util lib 2011-12-27 18:11:58 -02:00
Lucas De Marchi ea1b8c3702 kmod-depmod: Fix leak of dependency vector 2011-12-27 15:21:31 -02:00
Gustavo Sverzut Barbieri a627c3f31a kmod-depmod: refactor extension matching array, support XZ.
move the extensions array match to global, conditionally add GZ and XZ
if the support is enabled.
2011-12-27 12:09:17 -02:00
Gustavo Sverzut Barbieri 18cd9da303 kmod-depmod: implement -A (--quick) 2011-12-27 12:09:17 -02:00
Gustavo Sverzut Barbieri 4a0e46dac2 kmod-depmod: implement -F and -E options.
Read System.map and Module.symvers from kernel built, then be able to
report unknown symbols.
2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 7436788ca0 kmod-depmod: dump modules.dep.bin 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri ec77abb918 kmod-depmod: dump modules.alias.bin 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 75a9723bb2 kmod-depmod: dump modules.symbols.bin 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 4b144e5fb4 kmod-depmod: dump modules.builtin.bin 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 92df661697 kmod-depmod: add utility functions to be used by binary dumps.
Binary dumps will use functions to convert alias to underscores and
paths to module names.
2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 0de40463ba kmod-depmod: copy code from module-init-tools/index.c
Copy code from module-init-tools/index.c, the following copyright applies:

    Copyright (C) 2008  Alan Jenkins <alan-jenkins@tuffmail.co.uk>.
2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 8e3505c504 kmod-depmod: dump deps. 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 0d13174578 kmod-depmod: dump aliases 2011-12-27 12:09:16 -02:00
Gustavo Sverzut Barbieri 8bc830efc5 kmod-depmod: dump softdeps. 2011-12-27 12:09:16 -02:00