chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:53 +0000 (07:49 +0200)
commit6eeef058d5cb544c567ebc53b8e02d67d33080c9
tree814b67a1b6b40f13b2ba7c49940ac6a4aadae746
parentb3c9c3b4ea5bcd877602aa66884809e0ab1a7d76
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