Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 06:42:13 +0000 (UTC)
From:      John Hay <jhay@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194811 - head/sys/geom
Message-ID:  <200906240642.n5O6gDiB004317@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhay
Date: Wed Jun 24 06:42:13 2009
New Revision: 194811
URL: http://svn.freebsd.org/changeset/base/194811

Log:
  Do not stop the loop when an empty or deleted directory entry is found.
  Rather just skip over it.

Modified:
  head/sys/geom/geom_redboot.c

Modified: head/sys/geom/geom_redboot.c
==============================================================================
--- head/sys/geom/geom_redboot.c	Wed Jun 24 06:15:18 2009	(r194810)
+++ head/sys/geom/geom_redboot.c	Wed Jun 24 06:42:13 2009	(r194811)
@@ -195,7 +195,9 @@ parse_fis_directory(u_char *buf, size_t 
 	 */
 	fisdir = redbcfg = NULL;
 	*(tail = &head) = NULL;
-	for (i = 0; fd < efd && fd->name[0] != 0xff; i++, fd++) {
+	for (i = 0; fd < efd; i++, fd++) {
+		if (fd->name[0] == 0xff)
+			continue;
 		if (match(fd->name, FISDIR_NAME))
 			fisdir = fd;
 		else if (match(fd->name, REDBCFG_NAME))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906240642.n5O6gDiB004317>