]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: show original contents when editing unit 13589/head
authorwilliamvds <william@williamvds.me>
Wed, 21 Oct 2020 16:19:05 +0000 (17:19 +0100)
committerwilliamvds <william@williamvds.me>
Wed, 21 Oct 2020 20:20:01 +0000 (21:20 +0100)
commit85c5d313b5c92115f5c77663e736bcf21e99f02f
tree04f45fb961722bec2bff63a5d4ccd8955d1b6e47
parent6797a74f789210dc0ea475a1d066688c6ce5e929
systemctl: show original contents when editing unit

A comment indicates the start of the new contents of the override file,
and another indicates that lines following it will be discarded once
editing is finished.
The contents of the unit file and drop-ins are listed out after this
last marker.

Adds WRITE_STRING_FILE_TRUNCATE to set O_TRUNC when opening a file.

Thanks to cgzones for providing the required SELinux function calls.

Co-authored-by: Christian Göttsche <cgzones@googlemail.com>
TODO
src/systemctl/systemctl-edit.c