Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/installboot Stop directory entry search if d_reclen...



details:   https://anonhg.NetBSD.org/src/rev/0a6e0a7e136a
branches:  trunk
changeset: 526650:0a6e0a7e136a
user:      pk <pk%NetBSD.org@localhost>
date:      Tue May 07 12:22:23 2002 +0000

description:
Stop directory entry search if d_reclen == 0.

diffstat:

 usr.sbin/installboot/ffs.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 792287251c75 -r 0a6e0a7e136a usr.sbin/installboot/ffs.c
--- a/usr.sbin/installboot/ffs.c        Tue May 07 12:13:54 2002 +0000
+++ b/usr.sbin/installboot/ffs.c        Tue May 07 12:22:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs.c,v 1.3 2002/05/02 13:03:32 lukem Exp $    */
+/*     $NetBSD: ffs.c,v 1.4 2002/05/07 12:22:23 pk Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.3 2002/05/02 13:03:32 lukem Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.4 2002/05/07 12:22:23 pk Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -275,6 +275,8 @@
                        *((uint32_t *)_ino) = ino;
                        return (2);
                }
+               if (de->d_reclen == 0)
+                       break;
                de = (struct direct *)((char *)de + de->d_reclen);
        }
 



Home | Main Index | Thread Index | Old Index