summaryrefslogtreecommitdiff
path: root/src/basic/io-util.c
Commit message (Collapse)AuthorAgeFilesLines
* io-util: add an unlikely decorator for a test that should never holdLennart Poettering2018-02-201-1/+1
|
* io-util: make flush_fd() return how many bytes where flushedLennart Poettering2018-01-051-3/+6
| | | | | | | | | | | This is useful so that callers know whether anything at all and how much was flushed. This patches through users of this functions to ensure that the return values > 0 which may be returned now are not propagated in public APIs. Also, users that ignore the return value are changed to do so explicitly now.
* sd-resolve: propagate timeouts in sd_resolve_wait() the same way as in ↵Lennart Poettering2017-11-271-1/+0
| | | | | | | sd_bus_wait(): ETIMEDOUT Thankfully this is an internal API still, so we can mkae changes like this.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* core: rework how we flush incoming traffic when a socket unit goes downLennart Poettering2016-05-061-0/+5
| | | | | | | | | Previously, we'd simply close and reopen the socket file descriptors. This is problematic however, as we won't transition through the SOCKET_CHOWN state then, and thus the file ownership won't be correct for the sockets. Rework the flushing logic, and actually read any queued data from the sockets for flushing, and accept any queued messages and disconnect them.
* tree-wide: make ++/-- usage consistent WRT spacingVito Caputo2016-02-221-1/+1
| | | | | | Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* basic: include only what we useThomas Hindoe Paaboel Andersen2015-11-301-0/+5
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* util-lib: split out IO related calls to io-util.[ch]Lennart Poettering2015-10-261-0/+261