chiark / gitweb /
systemctl: append default suffix only if none present
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Nov 2014 16:28:10 +0000 (11:28 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Nov 2014 16:54:37 +0000 (11:54 -0500)
commit5e03c6e3b517286bbd65b48d88f60e5b83721894
tree02e4a3ebbf5f94b7f6cd2bf3f76886b65f5fa542
parent6872b0ddc4b748ba2dbe7e74e3bbde46d17a2656
systemctl: append default suffix only if none present

Simplify unit_name_mangle() and unit_name_mangle_with_suffix() to
always behave the same, and only append a suffix if there is no
type suffix. If a user says 'isolate blah.device' it is better to
return an error that the type cannot be isolated, than to try to
isolate blah.device.target.
src/shared/unit-name.c
src/shared/unit-name.h
src/systemctl/systemctl.c