summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add morph filebaserock/ps/update-linux-v3.12-systemd-v208Paul Sherwood2013-11-171-0/+23
|
* kmod 15v15Lucas De Marchi2013-08-223-3/+9
|
* libkmod: Fix getting param with no value from kcmdlineLucas De Marchi2013-08-131-1/+1
|
* testsuite: Add test for parameter with no value in kcmdlineLucas De Marchi2013-08-1314-0/+33
| | | | | Currently we fail to add the module option if the parameter doesn't have a value.
* depmod: add missing "else" clauseJan Engelhardt2013-08-092-2/+2
| | | | | | | | | | | It occurred to an openSUSE user that our mkinitrd would throw a warning when used with kmod: libkmod: conf_files_list: unsupported file mode /dev/null: 0x21b6 Grepping for the error message revealed that there might be a missing "else" keyword here, since it is unusual to put an "if" directly after closing brace.
* shell-completion: Make options accept '=' as last charLucas De Marchi2013-08-021-7/+29
|
* build: Install bash completion dataLucas De Marchi2013-07-302-2/+17
|
* shell-completion: Add kmod static-nodesLucas De Marchi2013-07-301-0/+25
|
* shell-completion: Add initial completion for kmodLucas De Marchi2013-07-302-1/+57
| | | | Based on journalctl and udevadm from systemd and adapted to kmod needs.
* NEWS: Add entriesLucas De Marchi2013-07-171-0/+10
|
* README: Move items from TODOLucas De Marchi2013-07-173-52/+58
| | | | | Put the differences between kmod and module-init-tools in the README file so it's more visible.
* static-nodes: create parent directories of output fileTom Gundersen2013-07-151-3/+9
| | | | Allows us to drop call to "mkdir -p" from the systemd service file.
* util: Add mkdir_parents()Lucas De Marchi2013-07-152-0/+12
| | | | Like mkdir_p, but discards the leaf, creating the parent directories.
* util: Add len arg to mkdir_p()Lucas De Marchi2013-07-153-6/+7
|
* static-nodes: don't fail if modules.devname not foundTom Gundersen2013-07-151-12/+19
| | | | | | | | In containers/VM's/initrd one might not have installed any modules and accompanying modules.devname Don't fail if this is the case, just warn. When used in systemd this means we don't get a failing unit on booting containers.
* util: Add mkdir_p implementation from testsuiteLucas De Marchi2013-07-156-109/+62
|
* testsuite: Fix mkdir_p corner casesLucas De Marchi2013-07-151-19/+32
| | | | | | | - Fix infinite loop when path is relative - Fix not considering EEXIST as a success - General refactor to mkdir_p so it never calls mkdir for an existing dir (given no one creates it from outside)
* Use "-internal" suffix instead of "-private"Lucas De Marchi2013-07-0414-21/+21
|
* tools: Do not link dynamically with libkmodLucas De Marchi2013-07-044-18/+13
| | | | | | | | | | | Instead of linking dynamically with libkmod, use libkmod-private.la. We disallow creating a static libkmod because we can't hide symbols there and it cause problems with external programs. However this should not prevent users that are only interested in the tools we provide not being able to ship only them keeping the library alone. Other projects also do this to allow our tools to use certain functions that should not be used outside of the project.
* kmod 14v14Lucas De Marchi2013-07-033-2/+21
|
* tools: Use test/kmod instead of kmod-nolibLucas De Marchi2013-07-025-16/+16
| | | | | | | | | | | | | | | | | | | | The reason to have a kmod-nolib binary is that we need to call kmod on test cases (or a symlink to it) and for testing things in tree. Since we are using libtool if we are dinamically linking to libkmod what we end up having is a shell script that (depending on the version *) changes argv[0] to contain an "lt-" prefix. Since this screws with our compat stuff, we had a kmod-nolib that links statically. This all workaround works fine iff we are using one of the compat commands, i.e. we are using the symlinks insmod, rmmod, modprobe, etc. However if we are actually trying the kmod binary, this doesn't work because we can't create a kmod symlink since there's already a kmod binary. So, completely give up on libtool fixing their mess. Now we create a tool/test/ directory and the symlinks and kmod is put there. * http://lists.gnu.org/archive/html/bug-libtool/2011-12/msg00023.html
* static-nodes: Better -f option descriptionLucas De Marchi2013-07-011-1/+1
|
* build-sys: do not allow --enable staticLucas De Marchi2013-06-061-0/+4
| | | | | | Do the same as done in systemd by Cristian Rodríguez <crrodriguez@opensuse.org>. We use private symbols, not namespaced. So don't pretend we support static linking.
* Add travis-ci config fileLucas De Marchi2013-05-111-0/+17
| | | | Experiment with a build bot.
* libkmod: Avoid calling syscall() with -1Jan Luebbe2013-05-111-0/+7
| | | | | | At least in qemu 1.4.1 for vexpress/arm-cortexa9, this resulted in an illegal instruction error. Solve that by returning an error when __NR_finit_module is -1.
* Revert "missing: Don't call syscall() with syscallno == -1"Lucas De Marchi2013-05-111-6/+4
| | | | | | | | | This reverts commit 38829712e5c411bc250aeae142fc6bf06e794d58. It fixes the problem, but it breaks the testsuite for those who don't have __NR_finit_module. The testsuite would have to make the same check. Instead, I'm reverting this change and I'm going to apply another patch from Jan Luebbe who got this right from the beginning.
* Add document for exported enumsChengwei Yang2013-05-042-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several exported enums by libkmod without document, this patch mainly added documentation for below enums like the way kmod_resources be documented in. * kmod_index * kmod_remove * kmod_insert * kmod_probe * kmod_filter * kmod_module_initstate This is not the best way to document these exported enums, however, it's the simple way due to gtkdoc limits. It doesn't support export plain enum like below: see https://bugzilla.gnome.org/show_bug.cgi?id=657444 ---------8<-------head.h--------------8<----------- ... enum foo { ... }; ... ---------8<-------end of head.h-------8<----------- ---------8<-------source.c------------8<----------- ... /** * document for foo here */ ... typedef enum foo foo; ... ---------8<-------end of source.c-----8<----------
* Several minor fixes for documentationChengwei Yang2013-05-042-9/+9
|
* modprobe: don't check refcount with remove commandJohannes Berg2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | The modprobe.d (5) documentation for the "install" command states that you could specify install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred This makes some sense, but then the loading of "barney" is hidden from the user who did only "modprobe fred". Thus, it seems it should be possible to be able to unload the "fred" module with "modprobe -r fred" by configuring the "barney" module to also be removed: remove fred /sbin/rmmod barney fred (or similar.) Make this possible by not checking the refcount when an unload command was configured. Reported-by: David Spinadel <david.spinadel@intel.com>
* missing: Don't call syscall() with syscallno == -1Lucas De Marchi2013-05-021-4/+6
| | | | | Reported-by: Jean-Francis Roy <jeanfrancis@funtoo.org> Reported-by: Jan Luebbe <jlu@pengutronix.de>
* Fix coding styleLucas De Marchi2013-04-301-2/+2
| | | | Either with space or without, not a mix of both.
* TODO: Add some entriesLucas De Marchi2013-04-301-0/+6
|
* libkmod-index: Return early if readroot failedLucas De Marchi2013-04-232-2/+10
|
* libkmod-module: Don't pass NULL ctx to kmod_logLucas De Marchi2013-04-231-1/+1
|
* libkmod-module: Don't pass NULL pointer to memcpyLucas De Marchi2013-04-232-3/+9
| | | | | When passing n=0, don't pass a NULL pointer, but instead pass anything else (like the pointer to the start of the string).
* build-sys: Add AM_V_XSLT to rule creating man pagesLucas De Marchi2013-04-211-1/+5
|
* Add format attribute and fix issuesLucas De Marchi2013-04-215-9/+13
| | | | | | | | | | Add __attribute__((format)) to log_filep() and _show() functions, fixing the bugs they found in the source code. For functions that receive va_list instead of being variadic functions we put 0 in the last argument, so at least the string is checked and we get warnings of -Wformat-nonliteral type. So, it's better than adding a pragma here to shut up the warning.
* static-nodes: Fix indentationLucas De Marchi2013-04-191-162/+170
| | | | | kmod uses tab instead of spaces and tries to honour 80chr limit, when that doesn't worsen the readability.
* static-nodes: tmpfiles - also create parents directories of device nodesTom Gundersen2013-04-191-3/+11
| | | | | | | | | | | | | | | | | | | | Before: c /dev/cpu/microcode 0600 - - - 10:184 c /dev/fuse 0600 - - - 10:229 c /dev/btrfs-control 0600 - - - 10:234 c /dev/loop-control 0600 - - - 10:237 c /dev/snd/timer 0600 - - - 116:33 After: d /dev/cpu 0755 - - - c /dev/cpu/microcode 0600 - - - 10:184 c /dev/fuse 0600 - - - 10:229 c /dev/btrfs-control 0600 - - - 10:234 c /dev/loop-control 0600 - - - 10:237 d /dev/snd 0755 - - - c /dev/snd/timer 0600 - - - 116:33
* kmod: It's an error not to have modules.devnameLucas De Marchi2013-04-171-2/+3
| | | | | | | | | | This file is created by depmod even if there's no node. In this case it will be empty. Previously 'kmod static-nodes' was segfaulting due to passing in==NULL to fgets. Also show the error message with %m.
* tools: add static-nodes toolTom Gundersen2013-04-164-1/+250
| | | | | | | | | | | | | | | This tool reads modules.devname from the current kernel directory and outputs the information. By default in a human-readable format, and optionally in machine-readable formats. For now only the tmpfiles.d(5) format is supported, but more could easily be added in the future if there is a need. This means nothing but kmod needs to reads the private files under /lib/modules/. In particular systemd-udevd can stop reading modules.devname. Tools that used to read /lib/modules/`uname -r`/modules.devname directly, can now move to reading 'kmod static-nodes devname'.
* Use static assertions for sizeof checksLucas De Marchi2013-04-151-5/+5
|
* Use _Static_assertLucas De Marchi2013-04-151-29/+7
| | | | | Both GCC and clang already supports C11's _Static_assert, so use it instead of defining our own macro.
* testsuite: errno is a positive numberLucas De Marchi2013-04-121-1/+1
|
* TODO: update and reorderLucas De Marchi2013-04-091-11/+10
|
* kmod 13v13Lucas De Marchi2013-04-093-2/+24
|
* build-sys: Always enable parallel testsLucas De Marchi2013-04-091-1/+1
| | | | | Automake < 1.13 doesn't enable parallel tests by default, so add it to our automake options.
* testsuite: Fix checking __sysnoLucas De Marchi2013-04-091-5/+5
| | | | | | | | | Use an if instead of a case statemente. If __NR_finit_module is not defined in system headers we define it to -1, causing a "duplicate case value" error. Yet, we don't want to actually call our finit_module() function if -1 is passed. This also fix errno being set with negative value.
* testsuite: Wrap syscall() to get calls to finit_module()Lucas De Marchi2013-04-091-0/+36
| | | | | | | | | | | | | | | | When we don't have finit_module() in libc (most likely because as of today glibc didn't add it yet), we end up using syscall(__NR_finit_module, ...). In this case we would not wrap the function in the testsuite and thus having some tests failing: TESTSUITE: ERR: could not insert module: Operation not permitted This implementation relies on the fact that this is the only caller of syscall(2), because we can't call libc's syscall(). There's an abort() in place to be future safe: as soon as we need more calls to syscall(), we can detect (and decide what to do). Now we have all tests passing in the testsuite again.
* libkmod: Move finit_module() definition to missing.hLucas De Marchi2013-04-094-8/+19
| | | | | | | | | Check for finit_module() and don't use our own static inline function if there's such function in libc (or another lib). In testsuite we need to unconditionally define HAVE_FINIT_MODULE because we want to override this function, and never use the static inline one in missing.h