diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-09-12 14:20:49 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-09-12 14:20:49 +0000 |
commit | b881e6f83b900490913e870f4d6df9a3e94c6c8c (patch) | |
tree | ba85c4f92d431f1cfba01297b2161ffae5b9a887 | |
parent | 78c17debb1198d7d84be280480ee1ba52ee38b73 (diff) | |
download | glibc-b881e6f83b900490913e870f4d6df9a3e94c6c8c.tar glibc-b881e6f83b900490913e870f4d6df9a3e94c6c8c.tar.gz glibc-b881e6f83b900490913e870f4d6df9a3e94c6c8c.tar.bz2 glibc-b881e6f83b900490913e870f4d6df9a3e94c6c8c.zip |
2.3.90-12
-rw-r--r-- | fedora/tzdata-update.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fedora/tzdata-update.c b/fedora/tzdata-update.c index 38539817d3..7f12322bf4 100644 --- a/fedora/tzdata-update.c +++ b/fedora/tzdata-update.c @@ -400,12 +400,18 @@ char zonename[1024]; ssize_t readall (int fd, void *buf, size_t len) { + INTERNAL_SYSCALL_DECL (err); size_t n = len; ssize_t ret; do { ret = INTERNAL_SYSCALL (read, err, 3, fd, buf, n); - if (ret <= 0) + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + { + ret = -1; + break; + } + else if (ret == 0) break; buf = (char *) buf + ret; n -= ret; @@ -417,12 +423,18 @@ readall (int fd, void *buf, size_t len) ssize_t writeall (int fd, const void *buf, size_t len) { + INTERNAL_SYSCALL_DECL (err); size_t n = len; ssize_t ret; do { ret = INTERNAL_SYSCALL (write, err, 3, fd, buf, n); - if (ret <= 0) + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + { + ret = -1; + break; + } + else if (ret == 0) break; buf = (const char *) buf + ret; n -= ret; |