3 void write_or_die(int fd
, const void *buf
, size_t count
)
9 written
= xwrite(fd
, p
, count
);
12 else if (written
< 0) {
15 die("write error (%s)", strerror(errno
));
22 int write_or_whine(int fd
, const void *buf
, size_t count
, const char *msg
)
28 written
= xwrite(fd
, p
, count
);
30 fprintf(stderr
, "%s: disk full?\n", msg
);
33 else if (written
< 0) {
36 fprintf(stderr
, "%s: write error (%s)\n",
37 msg
, strerror(errno
));