summaryrefslogtreecommitdiff
path: root/src/core/kmod-setup.c
AgeCommit message (Collapse)Author
2015-08-21core: downgrade "Module inserted" message for kmod to DEBUGLennart Poettering
Closes #919.
2015-07-01Revert "kmod-setup: don't print warning on -ENOSYS"David Herrmann
This partially reverts commit 78d298bbc57e412574ea35e6e66f562d97fd9ebc. The changed coding-style is kept, but the ENOENT->ENOSYS conversion is reverted. kmod was fixed upstream to no longer return ENOSYS. Also see: https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=114ec87c85c35a2bd3682f9f891e494127be6fb5 The kmod fix is marked for backport, so no reason to bump the kmod version we depend on.
2015-06-17turn kdbus support into a runtime optionKay Sievers
./configure --enable/disable-kdbus can be used to set the default behavior regarding kdbus. If no kdbus kernel support is available, dbus-dameon will be used. With --enable-kdbus, the kernel command line option "kdbus=0" can be used to disable kdbus. With --disable-kdbus, the kernel command line option "kdbus=1" is required to enable kdbus support.
2015-06-11kmod-setup: don't print warning on -ENOSYSDaniel Mack
-ENOSYS is returned from kmod_module_probe_insert_module() if a module isn't available, not -ENOENT. Don't spit out a warning in that case unless the warn_if_unavailable flag is set. Also factor out the condition into an own variable for better readability.
2015-06-11kmod-setup: when we fail to load a kmod, log the error causeLennart Poettering
(Also, downgrade message from LOG_ERROR to LOG_WARNING, after all we don't care much and just proceed)
2015-06-08kmod-setup: split warn flagsDaniel Mack
Traditionally, we used to warn about ipv6 being a module or being unavailable. This was changed in b4aa82f16 ("kmod-setup: don't warn when ipv6 can't be loaded") in a way that neither of the two conditions will cause a log message. Now, while running a setup without any IPv6 is completely fine and shouldn't cause any warning, we should still warn about ipv6 being a module instead of built-in. To achieve this, split the boolean warn flag into two: one for a feature not being built-in but shipped as a module, and one to print an error when a module is entirely unavailable. We will, however, still warn if kmod returns anything else than -ENOENT in the attempt of loading the module, and at the very least, turn the message into a debug log.
2015-06-05kmod-setup: don't warn when ipv6 can't be loadedDaniel Mack
Not having IPv6 is a valid setup. Let's not print a warning in that case. Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=87475
2015-05-18kmod-setup: conditionalize kmod autoloading properlyLennart Poettering
Load kdbus.ko only if we are built with kdbus, and load ip_tables.ko only if we are built with iptables support.
2015-05-06bus: don't switch to kdbus if not requestedDavid Herrmann
Whenever systemd is re-executed, it tries to create a system bus via kdbus. If the system did not have kdbus loaded during bootup, but the module is loaded later on manually, this will cause two system buses running (kdbus and dbus-daemon in parallel). This patch makes sure we never try to create kdbus buses if it wasn't explicitly requested on the command-line.
2015-04-22kmod-setup: load ip_tables kmod at bootLennart Poettering
The module is currently no auto-loadable (and this is unlikely to change anytime soon, given it's API is via getsockopt/setsockopt). It is needed by networkd and nspawn currently. Users who really don't like the module to be loaded have the option to blacklist it still, or not compile it at all. But for all others this should make things work out-of-the-box.
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2014-11-27kmod-setup: simplify kernel command line parsingLennart Poettering
2014-11-27log: rearrange log function namingLennart Poettering
- Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style.
2014-11-27log: add an "error" parameter to all low-level logging calls and intrdouce ↵Lennart Poettering
log_error_errno() as log calls that take error numbers This change has two benefits: - The format string %m will now resolve to the specified error (or to errno if the specified error is 0. This allows getting rid of a ton of strerror() invocations, a function that is not thread-safe. - The specified error can be passed to the journal in the ERRNO= field. Now of course, we just need somebody to convert all cases of this: log_error("Something happened: %s", strerror(-r)); into thus: log_error_errno(-r, "Something happened: %m");
2014-11-26core: reindent mount/kmod tablesLennart Poettering
2014-11-14kmod-setup: improve for "kdbus" word on the kernel cmdlineLennart Poettering
We really shouldn't check for words with "strstr()"...
2014-11-14kmod: move #ifdef checks for kmod-setup out of main.c into kmod-setup.cLennart Poettering
2014-11-13sd-bus: sync with kdbus upstream (ABI break)Daniel Mack
kdbus has seen a larger update than expected lately, most notably with kdbusfs, a file system to expose the kdbus control files: * Each time a file system of this type is mounted, a new kdbus domain is created. * The layout inside each mount point is the same as before, except that domains are not hierarchically nested anymore. * Domains are therefore also unnamed now. * Unmounting a kdbusfs will automatically also detroy the associated domain. * Hence, the action of creating a kdbus domain is now as privileged as mounting a filesystem. * This way, we can get around creating dev nodes for everything, which is last but not least something that is not limited by 20-bit minor numbers. The kdbus specific bits in nspawn have all been dropped now, as nspawn can rely on the container OS to set up its own kdbus domain, simply by mounting a new instance. A new set of mounts has been added to mount things *after* the kernel modules have been loaded. For now, only kdbus is in this set, which is invoked with mount_setup_late().
2014-11-07util: simplify proc_cmdline() to reuse get_process_cmdline()Lennart Poettering
Also, make all parsing of the kernel cmdline non-fatal.
2014-06-17kmod: conditionalize kmod setup on CAP_SYS_MODULE, not whether we run in a ↵Lennart Poettering
container It's generally preferrable to conditionalize on the actual ability to do something then the context we run in.
2014-02-20macro: introduce a nice macro for disabling -Wformat-nonliteral temporarilyLennart Poettering
2013-12-19do not run kmod-setup in a containerKay Sievers
2013-12-18temporarily support "kdbus" keyword on the kernel commandline to load the moduleKay Sievers
2013-05-07kmod-setup: properly iterate through module tableLennart Poettering
Previously we skipped every second entry. This also cleans up much of the code and removes some dead code.
2012-11-04kmod-setup: mounting efivarfs, *after* we tried to mount it, is pointlessKay Sievers
The mount() system call, which we issue before loading modules, will trigger a modprobe by the kernel and block until it returns. Trying to load it again later, will have exactly the same result as the first time.
2012-11-04kmod-setup: add conditional module loading callbackKay Sievers
2012-10-30systemd: mount the EFI variable filesystemLee, Chun-Yi
Add efivarfs to the mount_table in mount-setup.c, so the EFI variable filesystem will be mounted when systemd executed. The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel. Cc: Kay Sievers <kay@vrfy.org> Cc: Lennart Poettering <lennart@poettering.net> Cc: Mantas Mikulėnas <grawity@gmail.com> Cc: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Cc: Matt Fleming <matt.fleming@intel.com> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
2012-06-28modules-load: use correct va_list logging functionMichal Schmidt
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-04-11move libsystemd_core.la sources into core/Kay Sievers