diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-17 15:50:16 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-29 16:17:57 +0200 |
commit | 48ed75adabef3427767038fa155e55b3b0d48f35 (patch) | |
tree | 55ab5d546cef4b75803941d1e715c6432094325b /src/basic | |
parent | bd177c62158df97785af0d360c4fc9c266311d88 (diff) | |
download | systemd-48ed75adabef3427767038fa155e55b3b0d48f35.tar.gz |
shared/install: split UNIT_FILE_SYMLINK into two states
The two states are distinguished, but are treated everywhere identically,
so there is no difference in behaviour except for slighlty different log
output.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/unit-file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/unit-file.c b/src/basic/unit-file.c index 2474648ceb..7c1ae515e1 100644 --- a/src/basic/unit-file.c +++ b/src/basic/unit-file.c @@ -282,7 +282,9 @@ int unit_file_resolve_symlink( * * If resolve_destination_target is true, an absolute path will be returned. * If not, an absolute path is returned for linked unit files, and a relative - * path otherwise. */ + * path otherwise. + * + * Returns an error, false if this is an alias, true if it's a linked unit file. */ assert(filename); assert(ret_destination); @@ -364,7 +366,7 @@ int unit_file_resolve_symlink( } *ret_destination = TAKE_PTR(dst); - return 0; + return !tail; /* true if linked unit file */ } int unit_file_build_name_map( |