aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/io.h
blob: 25f360c2d754b5e242ae0079ec263bba9f574099 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
/* See LICENSE file for copyright and license details. */

#define ewriteall(...) enwriteall(1, __VA_ARGS__)

int writeall(int fd, void *buf, size_t n);

static inline void
enwriteall(int status, int fd, void *buf, size_t n, const char *fname)
{
	if (writeall(fd, buf, n))
		enprintf(status, "write %s:", fname);
}