summaryrefslogtreecommitdiffstats
path: root/src/basic/sync-util.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sync-util: port fsync_directory_of_file() to fd_is_opath()Lennart Poettering2023-02-171-10/+6
| | | | | | As suggested here: https://github.com/systemd/systemd/pull/26450#pullrequestreview-1302922404
* tree-wide: use -EBADF for fd initializationZbigniew Jędrzejewski-Szmek2022-12-191-5/+5
| | | | | | | | | | | | | | | | -1 was used everywhere, but -EBADF or -EBADFD started being used in various places. Let's make things consistent in the new style. Note that there are two candidates: EBADF 9 Bad file descriptor EBADFD 77 File descriptor in bad state Since we're initializating the fd, we're just assigning a value that means "no fd yet", so it's just a bad file descriptor, and the first errno fits better. If instead we had a valid file descriptor that became invalid because of some operation or state change, the other errno would fit better. In some places, initialization is dropped if unnecessary.
* tree-wide: use new RET_NERRNO() helper at various placesLennart Poettering2021-11-161-18/+6
|
* basic: split out sync() family of calls from fs-util.[ch] into new c/h fileLennart Poettering2021-10-051-0/+175
No changes in code, just some splitting out.