summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_redboot.c
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>2009-06-24 06:42:13 +0000
committerjhay <jhay@FreeBSD.org>2009-06-24 06:42:13 +0000
commit4067f2d3afc89b4896559d919d32b00ba4fb68e5 (patch)
tree2eca9ef2988139c00508fce3d6258201dc5bbbdb /sys/geom/geom_redboot.c
parentdaf18f9631bdf96db3941fb37ecee3310bd64220 (diff)
downloadFreeBSD-src-4067f2d3afc89b4896559d919d32b00ba4fb68e5.zip
FreeBSD-src-4067f2d3afc89b4896559d919d32b00ba4fb68e5.tar.gz
Do not stop the loop when an empty or deleted directory entry is found.
Rather just skip over it.
Diffstat (limited to 'sys/geom/geom_redboot.c')
-rw-r--r--sys/geom/geom_redboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_redboot.c b/sys/geom/geom_redboot.c
index 0314fe7..3ece7c1 100644
--- a/sys/geom/geom_redboot.c
+++ b/sys/geom/geom_redboot.c
@@ -195,7 +195,9 @@ parse_fis_directory(u_char *buf, size_t bufsize, off_t offset, uint32_t offmask)
*/
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))
OpenPOWER on IntegriCloud