]> git.ipfire.org Git - thirdparty/systemd.git/commit
fileio: tweak write_string_stream_ts() to write out trailing \n in one go even if...
authorLennart Poettering <lennart@poettering.net>
Sat, 30 Dec 2017 14:42:03 +0000 (15:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Jan 2018 12:28:24 +0000 (13:28 +0100)
commit91dc2bf74dee032512f20070f33d37abeca74f38
tree2668822a2f86ab9909a749731710c16a1a30a859
parent3e641e361d8b62923bea3cd9786dbd5cfba26b89
fileio: tweak write_string_stream_ts() to write out trailing \n in one go even if buffering is off

This tweaks write_string_stream_ts() in one minor way: when stdio
buffering has been turned off, let's append the newline we shall append
to the buffer we write ourselves so that the kernel only gets one
syscall for the result. When buffering is enabled stdio will take care
of that anyway.

Follow-up for #7750.
src/basic/fileio.c