]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemd-escape.xml
Rework unit_name_mangle_with_suffix() to (very slightly) simplify the path 29193/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Sep 2023 18:22:29 +0000 (20:22 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Sep 2023 11:09:25 +0000 (13:09 +0200)
commit5342eb4633e4a913e0049946ea31cc665894cc10
tree449419acbf32edd908c47b76a98b94916c6ac310
parent660087dc9c4a5c610da99e7b6b1772e371eb0a80
Rework unit_name_mangle_with_suffix() to (very slightly) simplify the path

'systemctl status /../dev' now looks for 'dev.mount', not '-..-dev.service',
and 'systemctl status /../foo' looks for 'foo.mount', not '-..-foo.service'. I
think this much more useful. I think the escaping is not very useful, so I plan
to submit a later series which changes that behaviour. But I think this first
step here is already useful on its own.

Note that the patch is smaller than it seems: before, is_device_path() would
return true only for absolute paths, so moving of is_device_path() under the
path_is_absolute() conditional doesn't influence the logic.
man/systemd-escape.xml
src/basic/unit-name.c
src/test/test-unit-name.c
test/units/testsuite-74.escape.sh