summaryrefslogtreecommitdiff
path: root/src/basic/path-lookup.h
Commit message (Collapse)AuthorAgeFilesLines
* basic: add RuntimeScope enumLennart Poettering2023-03-101-12/+5
| | | | | | | | | | | | In various tools and services we have a per-system and per-user concept. So far we sometimes used a boolean indicating whether we are in system mode, or a reversed boolean indicating whether we are in user mode, or the LookupScope enum used by the lookup path logic. Let's address that, in introduce a common enum for this, we can use all across the board. This is mostly just search/replace, no actual code changes.
* Rename def.h to constants.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+1
| | | | | | The name "def.h" originates from before the rule of "no needless abbreviations" was established. Let's rename the file to clarify that it contains a collection of various semi-related constants.
* Rename UnitFileScope to LookupScopeZbigniew Jędrzejewski-Szmek2022-03-291-8/+13
| | | | | | | | | As suggested in https://github.com/systemd/systemd/pull/22649/commits/8b3ad3983f5440eef812b34e5ed862ca59fdf7f7#r837345892 The define is generalized and moved to path-lookup.h, where it seems to fit better. This allows a recursive include to be removed and in general makes things simpler.
* systemctl: fix silent failure when --root is not foundZbigniew Jędrzejewski-Szmek2022-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | Some calls to lookup_path_init() were not followed by any log emission. E.g.: $ SYSTEMD_LOG_LEVEL=debug systemctl --root=/missing enable unit; echo $? 1 Let's add a helper function and use it in various places. $ SYSTEMD_LOG_LEVEL=debug build/systemctl --root=/missing enable unit; echo $? Failed to initialize unit search paths for root directory /missing: No such file or directory 1 $ SYSTEMCTL_SKIP_SYSV=1 build/systemctl --root=/missing enable unit; echo $? Failed to initialize unit search paths for root directory /missing: No such file or directory Failed to enable: No such file or directory. 1 The repeated error in the second case is not very nice, but this is a niche case and I don't think it's worth the trouble to trying to avoid it.
* portable: move profile search helper to path-lookupLuca Boccassi2021-11-261-0/+3
| | | | Will be used in systemd-analyze later
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* Replace gendered pronouns with gender neutral ones. (#16844)PhoenixDiscord2020-08-271-1/+1
|
* sd-path: export "systemd-network-path"Zbigniew Jędrzejewski-Szmek2020-03-271-0/+1
| | | | Inspired by https://lists.freedesktop.org/archives/systemd-devel/2020-March/044169.html.
* network: move NETWORK_DIRS to path-lookup.hZbigniew Jędrzejewski-Szmek2020-03-271-0/+3
| | | | In preparation for future changes...
* Move path-lookup.c to src/basicZbigniew Jędrzejewski-Szmek2020-03-271-0/+70
I want to use it from sd-path later on so it needs to be moved out of src/shared (libsystemd is not allowed to use code from src/shared).