]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
1999-04-07 Andreas Jaeger <aj@arthur.rhein-neckar.de>
authorAndreas Schwab <schwab@suse.de>
Wed, 7 Apr 1999 05:12:03 +0000 (05:12 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 7 Apr 1999 05:12:03 +0000 (05:12 +0000)
* sysdeps/unix/sysv/linux/getdents.c (__getdirentries): Return
directly if getdents returns with error set.

ChangeLog
sysdeps/unix/sysv/linux/getdents.c

index 93fea9a60d57a7fa696e5dbb0900b50dfea823ec..c963092e7361a6690be78297052a73fb0fcff47f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-04-07  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * sysdeps/unix/sysv/linux/getdents.c (__getdirentries): Return
+       directly if getdents returns with error set.
+
 1999-04-05  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
 
        * locale/langinfo.h (THOUSEP): Rename second occurence of
index b59acc0e1cb8ed2c599118308e9b3957fd1d187b..e0180dfa2e2739bc4520c7d10f08b98f0ce3a40b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -82,6 +82,9 @@ __getdirentries (int fd, char *buf, size_t nbytes, off_t *basep)
 
   retval = INLINE_SYSCALL (getdents, 3, fd, (char *) kdp, red_nbytes);
 
+  if (retval == -1)
+    return -1;
+  
   while ((char *) kdp < (char *) skdp + retval)
     {
       const size_t alignment = __alignof__ (struct dirent);