From 7984cfc7c18c85c5db42c5c7d57927b12c846ce0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 20 Jul 2003 21:11:43 +0000 Subject: * Argh, another short-write problem. Added wrappers around read()/write() to fix this once and for all. --- src/util.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/util.hh') diff --git a/src/util.hh b/src/util.hh index 611612a589c6..8b23bee00b76 100644 --- a/src/util.hh +++ b/src/util.hh @@ -85,4 +85,10 @@ void msg(const format & f); void debug(const format & f); +/* Wrappers arount read()/write() that read/write exactly the + requested number of bytes. */ +void readFull(int fd, unsigned char * buf, size_t count); +void writeFull(int fd, const unsigned char * buf, size_t count); + + #endif /* !__UTIL_H */ -- cgit 1.4.1