return total;
}
-void read_or_die(int fd, void *buf, size_t count)
-{
- ssize_t loaded;
-
- loaded = read_in_full(fd, buf, count);
- if (loaded != count) {
- if (loaded < 0)
- die("read error (%s)", strerror(errno));
- die("read error: end of file");
- }
-}
-
int write_in_full(int fd, const void *buf, size_t count)
{
const char *p = buf;