summaryrefslogtreecommitdiff
path: root/src/locale
Commit message (Collapse)AuthorAgeFilesLines
* bus: use bus_log_connect_error to print error messagefangxiuning2020-07-211-1/+1
|
* shared: split out code that maps properties to local structsLennart Poettering2020-06-301-0/+1
| | | | Just some refactoring, no code changes.
* shared: actually move all BusLocator related calls to bus-locator.cLennart Poettering2020-06-301-1/+1
|
* log: introduce log_parse_environment_cli() and log_setup_cli()Filipe Brandenburger2020-06-241-3/+1
| | | | | | | | | | | | | | | | Presently, CLI utilities such as systemctl will check whether they have a tty attached or not to decide whether to parse /proc/cmdline or EFI variable SystemdOptions looking for systemd.log_* entries. But this check will be misleading if these tools are being launched by a daemon, such as a monitoring daemon or automation service that runs in background. Make log handling of CLI tools uniform by never checking /proc/cmdline or EFI variables to determine the logging level. Furthermore, introduce a new log_setup_cli() shortcut to set up common options used by most command-line utilities.
* Merge pull request #16112 from poettering/nss-systemd-block-fixLennart Poettering2020-06-242-3/+3
|\ | | | | rework nss-systemd recursion lock
| * util: add dlfcn-util.hLennart Poettering2020-06-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This just adds a _cleanup_ helper call encapsulating dlclose(). This also means libsystemd-shared is linked against libdl now. I don't think this is much of an issue, since libdl is part of glibc anyway, and anything from exotic. It's not an optional part of the OS (think: NSS requires dynamic linking), hence this pulls in no deps and is almost certainly loaded into all process' memory anyway. [zj: use DEFINE_TRIVIAL_CLEANUP_FUNC().]
* | Make failures of mac_selinux_init() fatalChristian Göttsche2020-06-231-1/+4
|/
* tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriateLennart Poettering2020-05-251-3/+2
|
* Merge pull request #15651 from poettering/newlocale-checkZbigniew Jędrzejewski-Szmek2020-05-081-34/+53
|\ | | | | check if locales are installed before using them
| * tree-wide: port various bits over to locale_is_installed()Lennart Poettering2020-05-071-34/+53
| |
* | locale: switch to BusLocator-oriented helpersVito Caputo2020-05-071-15/+5
|/ | | | Mechanical substitution reducing some verbosity
* localed: convert to the new scheme and add --bus-introspectZbigniew Jędrzejewski-Szmek2020-05-051-3/+10
|
* importd,logind: add --bus-introspect= optionZbigniew Jędrzejewski-Szmek2020-05-051-0/+1
|
* logind,importd,hostnamed,localed,timedated,machined,resolved: add option ↵Zbigniew Jędrzejewski-Szmek2020-05-031-3/+7
| | | | | | | | parsing stubs --help and --version are implemented in the usual style. help() prints full path, since the program is not expected to be in $PATH.
* tree-wide: implement new log control API dbus interface in all our daemonsLennart Poettering2020-04-211-0/+5
|
* Merge pull request #15396 from keszybz/dbus-api-docsLennart Poettering2020-04-171-3/+29
|\ | | | | D-bus API docs
| * localed: add dbus parameter namesZbigniew Jędrzejewski-Szmek2020-04-121-3/+29
| |
* | Remove unneded {}sZbigniew Jędrzejewski-Szmek2020-04-131-2/+1
|/ | | | | | $ perl -i -0pe 's|\s+{\n([^\n]*;)\n\s+}\n|\n\1\n|gms' **/*.c Inspired by ea7cbf5bdd68d7861ebf1570c439e8bbabd83f6c.
* shared: split out polkit stuff from bus-util.c → bus-polkit.cLennart Poettering2020-01-222-2/+2
| | | | | | It's enough, complex stuff to warrant its own source file. No other changes, just splitting out.
* tree-wide: we forgot to destroy some bus errorsLennart Poettering2020-01-181-1/+1
|
* tree-wide: clean up --help texts a bitLennart Poettering2019-11-181-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up and unifies the outut of --help texts a bit: 1. Highlight the human friendly description string, not the command line via ANSI sequences. Previously both this description string and the brief command line summary was marked with the same ANSI highlight sequence, but given we auto-page to less and less does not honour multi-line highlights only the command line summary was affectively highlighted. Rationale: for highlighting the description instead of the command line: the command line summary is relatively boring, and mostly the same for out tools, the description on the other hand is pregnant, important and captions the whole thing and hence deserves highlighting. 2. Always suffix "Options" with ":" in the help text 3. Rename "Flags" → "Options" in one case 4. Move commands to the top in a few cases 5. add coloring to many more help pages 6. Unify on COMMAND instead of {COMMAND} in the command line summary. Some tools did it one way, others the other way. I am not sure what precisely {} is supposed to mean, that uppercasing doesn't, hence let's simplify and stick to the {}-less syntax And minor other tweaks.
* tree-wide: drop locale.h when locale-util.h is includedYu Watanabe2019-11-041-1/+0
|
* tree-wide: drop string.h when string-util.h or friends are includedYu Watanabe2019-11-043-3/+0
|
* Highlight the synopsis and summary in --helpZbigniew Jędrzejewski-Szmek2019-10-081-2/+5
| | | | | This doesn't cover all the binaries, but I don't know how to script this, and I run out of steam ;)
* tree-wide: get rid of strappend()Lennart Poettering2019-07-121-2/+2
| | | | | It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
* Rename EXTRACT_QUOTES to EXTRACT_UNQUOTEZbigniew Jędrzejewski-Szmek2019-06-281-3/+3
| | | | | | Whenever I see EXTRACT_QUOTES, I'm always confused whether it means to leave the quotes in or to take them out. Let's say "unquote", like we say "cunescape".
* tree-wide: drop alloca() in loopYu Watanabe2019-06-201-2/+2
|
* Enable log colors for most of tools in /usr/binZbigniew Jędrzejewski-Szmek2019-05-081-0/+1
| | | | | | | | | | When emitting the calendarspec warning we want to see some color. Follow-up for 04220fda5c. Exceptions: - systemctl, because it has a lot hand-crafted coloring - tmpfiles, sysusers, stdio-bridge, etc, because they are also used in services and I'm not sure if this wouldn't mess up something.
* Make fopen_temporary and fopen_temporary_label unlockedZbigniew Jędrzejewski-Szmek2019-04-121-2/+0
| | | | | | | | This is partially a refactoring, but also makes many more places use unlocked operations implicitly, i.e. all users of fopen_temporary(). AFAICT, the uses are always for short-lived files which are not shared externally, and are just used within the same context. Locking is not necessary.
* basic: add new helper call empty_or_dash_to_null()Lennart Poettering2019-04-081-12/+8
| | | | | We have a function like this at two places already. Let's unify it in one generic location and let's port a number of users over.
* tree-wide: introduce empty_or_dash() helperLennart Poettering2019-04-081-1/+1
| | | | | At quite a few places we check isempty() || streq(…, "-"), let's add a helper to simplify that, and replace that by a single function call.
* Voidify more mkdir_p callsZbigniew Jędrzejewski-Szmek2019-03-271-2/+1
|
* headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek2019-03-272-0/+4
| | | | | This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
* util: split out nulstr related stuff to nulstr-util.[ch]Lennart Poettering2019-03-141-0/+1
|
* util: split out kbd related stuffLennart Poettering2019-03-142-3/+3
| | | | | This stuff is neither generic enough to be in def.h, nor really has much to do with locale, hence give it its own .c/.h file pair.
* util: split out memcmp()/memset() related calls into memory-util.[ch]Lennart Poettering2019-03-131-1/+1
| | | | Just some source rearranging.
* tests: use the test helpers in more placesZbigniew Jędrzejewski-Szmek2019-03-041-2/+2
| | | | | This is mostly cosmetic. It makes those test binaries support SYSTEMD_LOG_* environment variables.
* Merge pull request #11041 from yuwata/update-missing-v2Lennart Poettering2018-12-041-0/+1
|\ | | | | missing: separate missing.h more
| * util: drop missing.h from util.hYu Watanabe2018-12-041-0/+1
| |
* | tree-wide: add whitespace between type and variable nameYu Watanabe2018-12-041-1/+1
|/
* util-lib: split out env file parsing code into env-file.cLennart Poettering2018-12-021-0/+2
| | | | | | It's quite complex, let's split this out. No code changes, just some file rearranging.
* util-lib: split out all temporary file related calls into tmpfiles-util.cLennart Poettering2018-12-021-0/+1
| | | | | | | | This splits out a bunch of functions from fileio.c that have to do with temporary files. Simply to make the header files a bit shorter, and to group things more nicely. No code changes, just some rearranging of source files.
* locale: define main through macroYu Watanabe2018-11-231-22/+15
|
* locale: store polkit_registry in ContextYu Watanabe2018-11-233-7/+9
|
* locale: rename context_free() to context_clear()Yu Watanabe2018-11-234-5/+5
|
* coccinelle: make use of SYNTHETIC_ERRNOZbigniew Jędrzejewski-Szmek2018-11-221-4/+3
| | | | | | | | | | | Ideally, coccinelle would strip unnecessary braces too. But I do not see any option in coccinelle for this, so instead, I edited the patch text using search&replace to remove the braces. Unfortunately this is not fully automatic, in particular it didn't deal well with if-else-if-else blocks and ifdefs, so there is an increased likelikehood be some bugs in such spots. I also removed part of the patch that coccinelle generated for udev, where we returns -1 for failure. This should be fixed independently.
* Split out pretty-print.c and move pager.c and main-func.h to shared/Zbigniew Jędrzejewski-Szmek2018-11-201-1/+1
| | | | | This is high-level functionality, and fits better in shared/ (which is for our executables), than in basic/ (which is also for libraries).
* locale: make "arg_host" constYu Watanabe2018-11-201-1/+1
|
* localectl: define main through macroZbigniew Jędrzejewski-Szmek2018-11-201-16/+9
|
* log: introduce new helper call log_setup_service()Lennart Poettering2018-11-201-3/+1
| | | | | Let's reduce the common boilerplate and have a single setup function used by all service code to setup logging.