]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: check null_or_empty for masked units instead of /dev/null
authorAnita Zhang <the.anitazha@gmail.com>
Thu, 28 May 2020 19:09:32 +0000 (12:09 -0700)
committerAnita Zhang <the.anitazha@gmail.com>
Fri, 3 Jul 2020 09:33:50 +0000 (02:33 -0700)
commit640f3b143d77b02612dc694a6a2be08f98d6c0e4
treec757369a2e6088a31b78a3035d662ff1c308e850
parenta68da222571789414b86d6bfa67aa7d38c63b19a
core: check null_or_empty for masked units instead of /dev/null

There's some inconsistency in the what is considered a masked unit:
some places (i.e. load-fragment.c) use `null_or_empty()` while others
check if the file path is symlinked to "/dev/null". Since the latter
doesn't account for things like non-absolute symlinks to "/dev/null",
this commit switches the check for "/dev/null" to use `null_or_empty_path()`
src/core/unit.c
src/shared/install.c
src/test/test-install-root.c