summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* backlight: reindent commentsYu Watanabe2021-02-221-32/+22
|
* backlight: reduce indentation a bitYu Watanabe2021-02-221-4/+2
|
* backlight: same_device() may return negative errnoYu Watanabe2021-02-221-1/+1
|
* backlight: exit earlier when unknown verb is specifiedYu Watanabe2021-02-221-1/+4
|
* Merge pull request #18684 from yuwata/sd-device-cleanups-and-udevadm-fixZbigniew Jędrzejewski-Szmek2021-02-2211-153/+192
|\ | | | | sd-device, udev: several cleanups and one udevadm fix
| * mount-tool: sd_device_get_sysattr_value() returns 0 on successYu Watanabe2021-02-211-1/+1
| |
| * sd-device-enumerator: shorten code a bitYu Watanabe2021-02-211-3/+1
| |
| * udevadm-trigger: introduce --quiet optionYu Watanabe2021-02-211-1/+8
| | | | | | | | This may be useful to invoke the command by non-privileged users.
| * udevadm-trigger: do not return immediately on EACCESYu Watanabe2021-02-211-3/+29
| | | | | | | | Prompted by https://github.com/systemd/systemd/pull/18559.
| * udevadm-trigger: use sd_device_trigger() for triggering ueventYu Watanabe2021-02-211-19/+15
| |
| * udev: use sd_device_trigger() to trigger ueventYu Watanabe2021-02-211-46/+33
| |
| * sd-device: introduce tiny wrapper sd_device_trigger()Yu Watanabe2021-02-213-0/+14
| |
| * sd-device: do not cache action string for uevent file written by ↵Yu Watanabe2021-02-211-0/+4
| | | | | | | | | | | | | | | | sd_device_set_sysattr_value() As sd_device_get_sysattr_value() may be already used to read uevent file. The read value of uevent file may be usually quite different from the action string.
| * test: add more tests for path_startswith()Yu Watanabe2021-02-211-0/+3
| |
| * sd-device: make devpath check stricterYu Watanabe2021-02-211-1/+1
| | | | | | | | See assertion in sd_device_get_devpath().
| * sd-device: make sd_device_get_xxx() accept NULL for storing resultYu Watanabe2021-02-211-26/+27
| | | | | | | | | | | | Though, setting NULL for some getters, e.g. sd_device_get_syspath() may be meaningless, but anyway also let's make them accept NULL for consistency.
| * sd-device: use appropriate error codeYu Watanabe2021-02-211-4/+4
| |
| * sd-device: add a brief comment in device_cache_sysattr_value()Yu Watanabe2021-02-211-0/+1
| |
| * sd-device: ignore error in device_cache_sysattr_value() and propagate ↵Yu Watanabe2021-02-214-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | original error code There are three calls of device_cache_sysattr_value(). Two of them are just caching the value. Hence, let's ignore its failure, and propagate original error code. One exception is the last call in sd_device_get_sysattr_value(). Unfortunately, it returns `const char *` instead of `char *`. So, sd_device object must have the reference of the returned value. Hence, error in updating the cache by device_cache_sysattr_value() is critical, and we need to propagate the error in that case.
| * sd-device: the last argument of sd_device_get_sysattr_value() may be NULLYu Watanabe2021-02-211-4/+5
| |
| * sd-device: use delete_trailing_chars()Yu Watanabe2021-02-211-6/+3
| | | | | | | | | | Also, this drops trailing '\r' from sysattr value set in sd_device_set_sysattr_value().
| * sd-device: do not cache an empty string but clear cache on failreYu Watanabe2021-02-211-15/+3
| | | | | | | | | | And propagate the original error on write. Note that some attributes are read-only.
| * sd-device: move comment about NULL valueYu Watanabe2021-02-211-2/+3
| | | | | | | | | | | | It is not intuitive, and I do not know why the function behave so. But let's keep that behavior for compatibility, as such behavior may be already used explicitly by callers.
| * sd-device: rename device_{add,get,remove}_sysattr_value()Yu Watanabe2021-02-211-10/+10
| | | | | | | | | | They just handle cache of sysattr values. Hence, let's use more explanatory names.
* | network: nexthop: add OnLink= settingYu Watanabe2021-02-214-3/+69
|/
* systemctl: don't search in the full argv[0] for the invocation nameLennart Poettering2021-02-207-15/+31
| | | | | | | | | | | | argv[0] might be prefixed by a path, and we shouldn't get confused by that. Hence provide a simple helper call that abstracts the checking away, which we can use everywhere, and expose the same behaviour, even if argv[0] is not set. (While we are at it, port all other multi-call binaries over to the new helper, too) Follow-up for: d41a9e4fc1e1bcdefc8d358da2744a97aac5820a
* network: fix typoYu Watanabe2021-02-202-2/+2
|
* network: make Broadcast= accept boolean valueYu Watanabe2021-02-202-2/+43
| | | | | | And disable it for wireguard interfaces by default. Closes #18492.
* Merge pull request #18699 from yuwata/network-route-add-nexthop-settingYu Watanabe2021-02-207-20/+169
|\ | | | | network: add NextHop= setting in [Route] section
| * network: add nexthop ID in debugging logsYu Watanabe2021-02-191-2/+3
| |
| * network: add NextHop= setting in [Route] sectionYu Watanabe2021-02-195-14/+149
| |
| * network: also manage nexthops by IDYu Watanabe2021-02-193-4/+17
| | | | | | | | It will be used in later commits.
* | sd-bus: simplify sd_bus_reply()Lennart Poettering2021-02-204-18/+12
| | | | | | | | there's no point in having two arguments, if one does as well.
* | fileio: extend comment about file sizes in virtual file systemsLennart Poettering2021-02-191-1/+3
| |
* | manager: taint systemd if cgroupsv1 is usedLennart Poettering2021-02-191-0/+4
| | | | | | | | | | let's mark cgroupsv1 systems as "tainted" in the taint string logic. It's time.
* | Merge pull request #18695 from keszybz/xdg-generator-silence-warningYu Watanabe2021-02-201-50/+44
|\ \ | | | | | | xdg-autostart-generator: silence warning
| * | xdg-autostart-generator: ignore DBusActivatable=trueZbigniew Jędrzejewski-Szmek2021-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://wiki.gnome.org/HowDoI/DBusApplicationLaunching and https://wiki.gnome.org/Initiatives/GnomeGoals/DBusActivatable for a description of this key: > Instead of the typical UNIX-style fork()/exec() approach to process creation, > launching an application is done by sending a D-Bus message to the well-known > name of that application, causing a D-Bus activation. > > Starting processes with D-Bus activation ensures that each application gets > started in its own pristine environment, as a direct descendent of the > session -- not in the environment of whatever its parent happened to be. This > is important for ensuring the app ends up in the correct cgroup, for example. So this motivation is not important for us: we launch stuff ourselves better. This fixes warnings during boot: systemd-xdg-autostart-generator[2274]: /etc/xdg/autostart/org.freedesktop.problems.applet.desktop:92: Unknown key name 'DBusActivatable' in section 'Desktop Entry', ignoring.
| * | xdg-autostart-generator: reindentZbigniew Jędrzejewski-Szmek2021-02-191-50/+43
| | |
* | | Merge pull request #18694 from keszybz/links-and-syntax-highlightingLennart Poettering2021-02-191-1/+1
|\ \ \ | | | | | | | | Links and syntax highlighting
| * | | tree-wide: fix links to systemd.io pagesZbigniew Jędrzejewski-Szmek2021-02-191-1/+1
| |/ / | | | | | | | | | | | | Having the extra slash at the end is not a problem, just inconsistent. But the links with .html or .md return 404.
* | | basic/alloc-util: also reset the cleaned-up variable in freep()Zbigniew Jędrzejewski-Szmek2021-02-191-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | freep() has it's own definition, so I missed it in fd421c4adc7406de02e03e2f7ceede2cc6e1d9d4. Again, there is a small growth, but the compiler should be able to optimize it away: -Dbuildtype=debug: -rwxrwxr-x 1 zbyszek zbyszek 4106816 Feb 19 12:52 build/libsystemd.so.0.30.0 -rwxrwxr-x 1 zbyszek zbyszek 7492952 Feb 19 12:52 build/src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 zbyszek zbyszek 4472624 Feb 19 12:53 build/systemd -rwxrwxr-x 1 zbyszek zbyszek 4107056 Feb 19 13:03 build/libsystemd.so.0.30.0 -rwxrwxr-x 1 zbyszek zbyszek 7493480 Feb 19 13:03 build/src/shared/libsystemd-shared-247.so -rwxrwxr-x 1 zbyszek zbyszek 4472760 Feb 19 13:03 build/systemd Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31055.
* | Merge pull request #18646 from yuwata/network-ip-masquerade-follow-upsZbigniew Jędrzejewski-Szmek2021-02-195-23/+55
|\ \ | | | | | | network: several follow-ups for recent IPMasquerade= change
| * | network: warn when any positive boolean string is specified for IPMasquerade=Yu Watanabe2021-02-193-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, any positive boolean string for IPMasquerade= enables only IPv4 masquerade. The commit 48ed276647c754bfb3ed5c6c5af9404e073ffe54 adds IPv6 masquerade support. However, only "yes" is handled as "ipv4", and other positive boolean strings are handled as "both". This makes all positive boolean strings considered as "ipv4", warn that they are deprecated, and suggest to use "ipv4" or "both". Follow-up for 48ed276647c754bfb3ed5c6c5af9404e073ffe54.
| * | network: address: reuse Address:ip_masquerade_done for IPv6 caseYu Watanabe2021-02-192-11/+2
| | | | | | | | | | | | | | | | | | It is not necessary to use different flag for each address family. Follow-up for 48ed276647c754bfb3ed5c6c5af9404e073ffe54.
* | | Fix grammar and a small typo on a commentSven Mueller2021-02-191-1/+1
| |/ |/| | | | | potentically -> potentially (And a small grammar fix)
* | network: nexthop: update ID of nexthop created without specifiying IDYu Watanabe2021-02-191-8/+67
| | | | | | | | | | | | | | Otherwise, nexthop_configure() -> nexthop_add() creates NextHop object without ID in link->nexthop, and then, manager_rtnl_process_nexthop() -> nexthop_add_foreign() also creates another NextHop object with ID in link->nexthop_foreign.
* | network: configure nexthop before routes that requires gatewayYu Watanabe2021-02-194-40/+119
| | | | | | | | | | This is a preparation for later commits. When RTA_NH_ID is set to a route, then the corresponding nexthop must be exist.
* | tree-wide: fix typoYu Watanabe2021-02-195-6/+6
|/
* Merge pull request #18659 from poettering/permyriadificationYu Watanabe2021-02-1930-384/+562
|\ | | | | use scaling relative to UINT32_MAX instead of percentages/permyriads wherever we can
| * oomd: increase accuracy of SwapUsedLimit= to permyriads tooLennart Poettering2021-02-187-42/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oomd.conf has two parameters with fractionals: SwapUsedLimit= and DefaultMemoryPressureLimit=, but one accepts permyriads, the other only percentages, for no apparent reason. One carries the "Percent" in the name, the other doesn't. Let's clean this up: always accept permyriads, and drop the suffix, given that it is misleading. I figure we should internally try to focus on scaling everything relative to UINT32_MAX, and if that isn't in the cards at least 10000, but never permille nor percent unless there's a really really good reason for it (e.g. interface defined by someone else).