summaryrefslogtreecommitdiff
path: root/src/shared/bus-get-properties.c
Commit message (Collapse)AuthorAgeFilesLines
* string-util: add strstrafter()Lennart Poettering2023-04-141-2/+2
| | | | | | | | | strstrafter() is like strstr() but returns a pointer to the first character *after* the found substring, not on the substring itself. Quite often this is what we actually want. Inspired by #27267 I think it makes sense to add a helper for this, to avoid the potentially fragile manual pointer increment afterwards.
* bus-util: introduce bus_property_get_tristate()Yu Watanabe2023-02-231-0/+16
| | | | This will be used in later commits.
* alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhereLennart Poettering2021-10-141-1/+1
| | | | | | | | | | | | | Let's define two helpers strdupa_safe() + strndupa_safe() which do the same as their non-safe counterparts, except that they abort if called with allocations larger than ALLOCA_MAX. This should ensure that all our alloca() based allocations are subject to this limit. afaics glibc offers three alloca() based APIs: alloca() itself, strndupa() + strdupa(). With this we have now replacements for all of them, that take the limit into account.
* tree-wide: use UINT64_MAX or friendsYu Watanabe2021-03-051-2/+2
|
* oom: rework *MemoryPressureLimit= properties to have 1/10000 precisionAnita Zhang2021-02-021-17/+0
| | | | | | | Requested in https://github.com/systemd/systemd/pull/15206#discussion_r505506657, preserve the full granularity for memory pressure limits (permyriad) instead of capping out at percent.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* core: add ManagedOOM*= properties to configure systemd-oomd on the unitAnita Zhang2020-10-071-0/+18
| | | | | This adds the hook ups so it can be read with the usual systemd utilities. Used in later commits by sytemd-oomd.
* shared: split out property get helpersLennart Poettering2020-06-301-0/+149
No code changes, just some refactoring.