]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemd-path: return accumulated error instead of last result
authoranthisfan <gtpgx305@gmail.com>
Sun, 14 Sep 2025 15:04:47 +0000 (00:04 +0900)
committerMike Yuan <me@yhndnzj.com>
Sun, 14 Sep 2025 20:18:19 +0000 (22:18 +0200)
commit778e95420a66ca34eb78008ccfac6153adf26310
tree366626ca873ac538d5640eb416e830ab9a99925c
parenta0203ac14c804240b39615ed5d4b044149c4b79d
systemd-path: return accumulated error instead of last result

Because it returns the result of the final sd_path_lookup() call rather than the return value of RET_GATHER,
it appears that it may return success even if an error occurs during processing.

With this patch, errors encountered during the loop will be properly tallied and returned, and failures will not be silently ignored.

Signed-off-by: anthisfan <gtpgx305@gmail.com>
src/path/path-tool.c