Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Jump out of the scandir loop if VOP_READDIR returns...



details:   https://anonhg.NetBSD.org/src/rev/eca917d67ce8
branches:  trunk
changeset: 500670:eca917d67ce8
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Dec 15 11:52:14 2000 +0000

description:
Jump out of the scandir loop if VOP_READDIR returns an error, avoiding
running around in circles.

diffstat:

 sys/kern/vfs_getcwd.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r bd4b4218adab -r eca917d67ce8 sys/kern/vfs_getcwd.c
--- a/sys/kern/vfs_getcwd.c     Fri Dec 15 07:16:36 2000 +0000
+++ b/sys/kern/vfs_getcwd.c     Fri Dec 15 11:52:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_getcwd.c,v 1.13 2000/03/30 09:27:14 augustss Exp $ */
+/* $NetBSD: vfs_getcwd.c,v 1.14 2000/12/15 11:52:14 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -253,7 +253,8 @@
                                }
                                cpos += reclen;
                        }
-               }
+               } else
+                       goto out;
        } while (!eofflag);
 #if 0
        /*



Home | Main Index | Thread Index | Old Index