summaryrefslogtreecommitdiff
path: root/src/binfmt
Commit message (Collapse)AuthorAge
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: more log_*_errno + return simplificationsMichal Schmidt2014-11-28
|
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* Introduce CONF_DIRS_NULSTR helper to define standard conf dirsJosh Triplett2014-11-26
| | | | | | | Several different systemd tools define a nulstr containing a standard series of configuration file directories, in /etc, /run, /usr/local/lib, /usr/lib, and (#ifdef HAVE_SPLIT_USR) /lib. Factor that logic out into a new helper macro, CONF_DIRS_NULSTR.
* Unify parse_argv styleZbigniew Jędrzejewski-Szmek2014-08-03
| | | | | | | | | | | | | | | | getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
* shared: add root argument to search_and_fopenMichael Marineau2014-03-14
| | | | | | | This adds the same root argument to search_and_fopen that conf_files_list already has. Tools that use those two functions as a pair can now be easily modified to load configuration files from an alternate root filesystem tree.
* log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2013-12-24
| | | | including it in the log strings
* clients: unify how we invoke getopt_long()Lennart Poettering2013-11-06
| | | | | Among other things this makes sure we always expose a --version command and show it in the help texts.
* fileio: in envfiles, do not skip lines following empty linesZbigniew Jędrzejewski-Szmek2013-04-13
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=63477
* util: rename write_one_line_file() to write_string_file()Lennart Poettering2013-04-03
| | | | | You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
* honor SELinux labels, when creating and writing config filesHarald Hoyer2013-02-14
| | | | | | | Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
* binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services ↵Lennart Poettering2013-02-11
| | | | | | | | | | | | | | | | | | | that work on .d/ directories This unifies much of the logic behind them: - All four will now ofllow the rule that the earlier file and earlier assignment in the .d/ directories wins. Before, sysctl was the only outlier, where the later setting always won. - All four now support getopt() and --help on the command line. - All four can now handle specification of configuration file names on the command line to apply. The tools will automatically find them, and apply them. Previously only tmpfiles could do that. This is useful for %post scripts in RPMs and suchlike. - This fixes various error path issues in conf_files_list()
* shared: conf-files - add root parameterKay Sievers2013-02-08
|
* continue work with error messages, log_oom()Shawn Landden2012-08-06
| | | | | | | Adds messages for formally silent errors: new "Failed on cmdline argument %s: %s". Removes some specific error messages for -ENOMEM in mount-setup.c. A few specific ones have been left in other binaries.
* util: split-out conf-file.[ch]Kay Sievers2012-05-07
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | 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.
* binfmt: fix apply loopLennart Poettering2012-03-22
| | | | Noticed by Sergey Ptashnick
* bmfmt: allow passing more than one config file nameLennart Poettering2012-03-20
|
* conf: when looking for configurations look in /etc first, in /run secondLennart Poettering2012-03-14
| | | | | | | | | | | After long consideration we came to the conclusion that user configuration in /etc should always override the (generally computer generated) configuration in /run. User configuration should always be what matters over anything else. Hence rearrange the search orders accordingly. In general this should change very little as overriding like this is seldomn done so far, and the order between /etc and /usr stays the same.
* build-sys: add stub makefiles to subdirsLennart Poettering2012-01-05
|
* binfmt: move sources to subdirectoryKay Sievers2011-12-31