From d2dc7d84732fc832aaac4891f84d38e3748f1af7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Feb 2005 22:58:32 +0000 Subject: * nscd/nscd-client.h: Include sys/uio.h. (__readall, __readvall, writeall): New prototypes. * nscd/connections.c (writeall): New function. (handle_request): Use it. * nscd/aicache.c (addhstaiX): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise. * nscd/nscd_helper.c (__readall, __readvall): New functions. * nscd/nscd_getai.c (__nscd_getai): Use them. * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. * nscd/nscd_getgr_r.c (__nscd_getgr_r): Likewise. * nscd/nscd_gethst_r.c (__nscd_gethst_r): Likewise. * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. --- nscd/nscd_getgr_r.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nscd/nscd_getgr_r.c') diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index 282912d..dae1c0d 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 +/* Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -202,7 +202,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, total_len = vec[0].iov_len + vec[1].iov_len; /* Get this data. */ - size_t n = TEMP_FAILURE_RETRY (__readv (sock, vec, 2)); + size_t n = __readvall (sock, vec, 2); if (__builtin_expect (n != total_len, 0)) goto out_close; } @@ -232,8 +232,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, retval = 0; if (gr_name == NULL) { - size_t n = TEMP_FAILURE_RETRY (__read (sock, resultbuf->gr_mem[0], - total_len)); + size_t n = __readall (sock, resultbuf->gr_mem[0], total_len); if (__builtin_expect (n != total_len, 0)) { /* The `errno' to some value != ERANGE. */ -- cgit v1.1