]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/edit-util: split out function to populate temp file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 2 Dec 2023 15:06:56 +0000 (16:06 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Dec 2023 17:11:38 +0000 (18:11 +0100)
commit5161836bd093c55bd92cb5314126968e6ebabd5d
treed1478389a8239f86dddb20765916d3c377c50806
parent465a9d2af8078d866d7d3384151d150d170634d4
shared/edit-util: split out function to populate temp file

In preparation for future changes: I want to add a mode where interactive
editing is not done, and when this preparation is moved to a helper, it's much
easier to skip it.

e->line is initialized to 1 and overwritten even if sync fails. Theoretically
this is against our style, but the alternative is to propagate a temporary
value of line through the layers, which adds a lot of noise. If we fail, this
EditFile object will not be used for anything, to the changed value of .line
has no effect.
src/shared/edit-util.c