summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-10-06 03:49:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-10-06 03:49:09 +0000
commitd754f366d6c4098d9b79178d87ea46611e60bdea (patch)
tree4e5a253689f8654a966dea7e6331b56cce77bedd /sbin
parent60116d4691558df2fdac78efe9738ac44a24baa1 (diff)
Ignore 'c' when computing overlap; some ports use "unknown" instead of
"unused" as the fstype.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/disklabel/editor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 2ac7a4fddff..f9af0c5365f 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.8 1997/10/03 23:01:52 millert Exp $ */
+/* $OpenBSD: editor.c,v 1.9 1997/10/06 03:49:08 millert Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.8 1997/10/03 23:01:52 millert Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.9 1997/10/06 03:49:08 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -1072,9 +1072,9 @@ has_overlap(lp, freep, resolve)
u_int16_t npartitions;
int c, i, j, rval = 0;
- /* How many "real" partitions do we have? */
+ /* How many "real" partitions do we have? (skip 'c') */
for (npartitions = 0, i = 0; i < lp->d_npartitions; i++) {
- if (lp->d_partitions[i].p_fstype != FS_UNUSED &&
+ if (i != 2 && lp->d_partitions[i].p_fstype != FS_UNUSED &&
lp->d_partitions[i].p_fstype != FS_BOOT &&
lp->d_partitions[i].p_size != 0)
npartitions++;
@@ -1088,7 +1088,7 @@ has_overlap(lp, freep, resolve)
errx(4, "out of memory");
for (npartitions = 0, i = 0; i < lp->d_npartitions; i++) {
- if (lp->d_partitions[i].p_fstype != FS_UNUSED &&
+ if (i != 2 && lp->d_partitions[i].p_fstype != FS_UNUSED &&
lp->d_partitions[i].p_fstype != FS_BOOT &&
lp->d_partitions[i].p_size != 0)
spp[npartitions++] = &lp->d_partitions[i];