Lucas De Marchi
769becb5db
tools: kmod: Add handling of compat modinfo
2011-12-23 03:09:05 -02:00
Lucas De Marchi
ad6026965f
tools: kmod: Add handling of compat insmod
2011-12-23 03:09:05 -02:00
Lucas De Marchi
f712ebc429
tools: kmod: Add handling of compat rmmod
2011-12-23 03:09:05 -02:00
Lucas De Marchi
6fcf69e62b
tools: kmod: Add handling of compat lsmod
2011-12-23 03:09:05 -02:00
Lucas De Marchi
35a29aa519
tools: kmod: check progname for handling compat commands
2011-12-23 03:09:05 -02:00
Cristian Rodríguez
67d94ad388
Fix leak on error path
2011-12-23 03:08:57 -02:00
Lucas De Marchi
bc85432aa3
tools: kmod: Add global options
2011-12-23 03:03:23 -02:00
Lucas De Marchi
8900b9166b
tools: add skeleton of kmod tool
...
If using libtool 2.4.2, running the script generated by libtool will not
work because libtool changes argv[0] to lt-progname.
To test this is necessary to either fix the installed
build-aux/ltmain.sh file or run the binary directly like in:
$ export LD_LIBRARY_PATH=$PWD/libkmod/.libs/
$ ./tools/.libs/kmod help
2011-12-23 03:01:58 -02:00
Lucas De Marchi
6a4fa8d8f1
build-sys: use MKDIR_P
2011-12-23 01:59:31 -02:00
Lucas De Marchi
3e8de63d2d
kmod_modprobe: use basename(argv[0]) in help message
2011-12-23 01:36:27 -02:00
Gustavo Sverzut Barbieri
5f9f58f9f6
kmod-modprobe: fix leak in command line option processing.
...
not that it should matter for the binary, but let's be strict with
leaks so running in valgrind never complains.
2011-12-23 01:25:21 -02:00
Kay Sievers
e79bf83b06
introduce --with-rootlibdir=DIR
...
Support the installation of the shared library in the rootfs --rootlibdir=,
while the development symlink stays in --libdir=.
2011-12-22 19:08:04 -02:00
Lucas De Marchi
759214fad0
Initialize line number with 0
2011-12-22 01:30:40 -02:00
Lucas De Marchi
c72f79b465
Remove useless warning causing trouble in sparc64
...
-Wcast-align is not that useful and just generates lots of warnings in
architectures like sparc64.
2011-12-21 20:10:43 -02:00
Gustavo Sverzut Barbieri
c6824b62f2
Fix unaligned memory access
...
Bug found on sparc64. Thanks to "Jan Engelhardt <jengelh@medozas.de>"
for providing access to such a machine.
2011-12-21 18:37:46 -02:00
Kay Sievers
9faa7b376c
do not (mis-)use the config file generator for non-autobuild stuff
...
"Similarly, you should not rely on AC_CONFIG_FILES to replace bindir
and friends in your shell scripts and other files; instead, let make
manage their replacement."
http://www.gnu.org/software/autoconf/manual/autoconf.html#Makefile-Substitutions
2011-12-21 11:50:04 -02:00
Lucas De Marchi
205c24e636
gitignore: ignore dist files
2011-12-21 11:44:25 -02:00
Lucas De Marchi
acc18b1451
kmod 2
2011-12-20 23:48:46 -02:00
Lucas De Marchi
f304afe153
Change error message to reflect reality
2011-12-20 23:48:27 -02:00
Lucas De Marchi
142db570bf
Update doc to reflect function behavior
2011-12-20 23:39:30 -02:00
Luis Felipe Strano Moraes
9efaf2f627
Testing for return of alias_normalize.
2011-12-20 23:23:55 -02:00
Lucas De Marchi
7ea6eddda2
build-sys: do not use some compile flags by default
2011-12-20 19:45:59 -02:00
Lucas De Marchi
f39dc70e4b
Removing comments saying flags are not implemented
...
Both removal and insertion flags are already implemented.
2011-12-20 19:31:14 -02:00
Lucas De Marchi
5e50464548
Move symbols introduced in libkmod2 to the right place
2011-12-20 17:16:24 -02:00
Lucas De Marchi
9ce0966197
build-sys: remove remaining _SOURCES var
2011-12-20 16:57:11 -02:00
Lucas De Marchi
0c5fad937a
build-sys: default to "" as rootprefix
2011-12-20 16:52:21 -02:00
Lucas De Marchi
2c96693eb2
kmod_modprobe: fix description of -C flag
2011-12-20 16:39:59 -02:00
Gustavo Sverzut Barbieri
1e482783ad
configure: disable static zlib build.
...
It was not being done correctly, disable until we find a way for
libtool to cooperate.
2011-12-20 16:33:26 -02:00
Kay Sievers
a308abec37
introduce --with-rootprefix=DIR
...
Configure the location of the rootfs directories and use it
to find (/usr)/lib/modules and (/usr)/lib/modprobe.d.
2011-12-20 16:22:07 -02:00
Lucas De Marchi
7fe5f7abce
Use sorted configuration files in precedence order
...
We need to keep config files sorted and use them taking the precedence
order into account.
The following message was taken from module-init-tools commit doing a
similar thing:
Configuration files are parsed in alphabetic order, regardles of
what directory they reside in. Furthermore, if several files by
the same name exist in different directories only the one in the
directory with highest precedence is loaded.
The order of precedence is /run, /etc, /usr/lib, /lib.
The sad thing is that we are not using openat() anymore since each file
is in different directories. In future we might change the
implementation to open all DIRs and keep a reference
to them instead of the path. However we'd have to keep a separate list
with all the opened dirs so we can close them later (when all configs
are parsed).
2011-12-20 16:08:18 -02:00
Jan Engelhardt
a597c8bbf5
build: use dist-xz
...
It's 2011 already.
2011-12-20 13:48:44 -02:00
Jan Engelhardt
2689912b56
gitignore: only ignore build system files in the top directory
2011-12-20 13:48:44 -02:00
Jan Engelhardt
87beacc99f
libkmod: use C99 __func__ over GNU-specific __FUNCTION__
2011-12-20 13:48:44 -02:00
Lucas De Marchi
135bffd652
kmod_config: fix kcmd line parser with dots after =
...
Check if '=' appeared before the dot. In this case, it's not a valid
module option in kernel command line.
The command line that was failing is:
"root=/dev/sda3 ro pcie_aspm=force init=/sbin/bootchartd
initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux"
2011-12-20 13:25:24 -02:00
Luis Felipe Strano Moraes
a969376fb0
Removing warnings when compiling on i686 platform.
2011-12-20 13:15:32 -02:00
Gustavo Sverzut Barbieri
b55df2ee03
kmod_module_new_*: improve debugging.
2011-12-20 13:13:41 -02:00
Lucas De Marchi
95dd837daf
kmod_modprobe: Fix regression when inserting module
...
Commit "e5e2a68 kmod_modprobe: properly handle install/remove commands"
introduced a regression that, while it worked for install/remove
commands, it ceased to work for normal module names. Move the check for
whether it's a install command or a module so both cases work.
2011-12-20 13:11:33 -02:00
Lucas De Marchi
16ca3666bf
Fix check for opened indexes
2011-12-20 12:29:13 -02:00
Lucas De Marchi
76b8031bce
elf: fix regression with empty strings
...
Commit "b20dc17 Remove unneeded reference to last string" reverted the
fix in "47a0ef6 elf: do not output empty strings." and empty strings are
appearing again in kmod-modinfo.
With this commit we do a bit different and instead of keeping the
reference to last string we skip the '\0' inside the loop.
2011-12-20 12:04:21 -02:00
Lucas De Marchi
51c409b449
Cache the offset of crc
...
This way we don't need to check every time in loop. Indeed compiler
could already optimize out that checks, but this ways is cleaner and
shorter.
2011-12-20 11:41:19 -02:00
Lucas De Marchi
58b7191c94
Make section size constant since it's always the same
2011-12-20 11:35:17 -02:00
Lucas De Marchi
f8fa525c7f
Optimize kmod_elf_get_strings() by reducing calls to memcpy
...
Copy the entire string only once and then scan it, setting up the
pointers of the vector.
2011-12-20 03:34:28 -02:00
Lucas De Marchi
b20dc17068
Remove unneeded reference to last string
2011-12-20 03:27:51 -02:00
Lucas De Marchi
052656f5b3
Put blank lines where it's due
...
See CODING-STYLE for reference
2011-12-20 03:27:51 -02:00
Lucas De Marchi
3267026e0b
Terminate strv with NULL
2011-12-20 03:27:50 -02:00
Lucas De Marchi
4f0f0e75e2
Reduce ident by continuing early
2011-12-20 03:27:50 -02:00
Lucas De Marchi
0eae38e6cf
build-sys: remove unneeded _SOURCES vars
2011-12-20 03:27:50 -02:00
Gustavo Sverzut Barbieri
1c58590549
elf: skip leading symbol dot in modversion.
...
Mimics module-init-tools's dump_modversions() that calls skip_dot()
to skip leading dots. This is required for PPC64.
2011-12-19 21:55:27 -02:00
Gustavo Sverzut Barbieri
fc8e58ba4e
elf: fix typo that resulted in invalid uint reads for big-endian platforms.
2011-12-19 21:55:22 -02:00
Gustavo Sverzut Barbieri
b014c490cb
kmod-modinfo: -p (-F parm) shows also parmtype in Debian expected formatting.
...
debian expected formatting is:
name:description (type)
variants:
name:description
name: (type)
2011-12-19 18:32:58 -02:00