diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-01 18:20:03 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-01-01 18:20:03 +0000 |
commit | e5f74dffc9438dc1dd8ae05942cab03d40a5d726 (patch) | |
tree | 33d22a1d1ecd0f92a26abad0d5547a065138a134 /sbin/disklabel | |
parent | 6b62526b371fc7bca229f720fd80f3f630ab1a83 (diff) |
Oops. Missed a couple of unnecessary 'DL_GETPOFFSET()+DL_GETPSIZE() >
ending_sector' tests and one superfluous editor_countfree(). Rectify a
few comments.
Diffstat (limited to 'sbin/disklabel')
-rw-r--r-- | sbin/disklabel/editor.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 0481ac53837..edea308270f 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.137 2008/01/01 17:15:03 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.138 2008/01/01 18:20:02 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.137 2008/01/01 17:15:03 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.138 2008/01/01 18:20:02 krw Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -564,10 +564,8 @@ getoff1: } } - /* Update free sector count and make sure things stay contiguous. */ - editor_countfree(lp, freep); - if (DL_GETPSIZE(pp) + DL_GETPOFFSET(pp) > ending_sector || - has_overlap(lp, freep, -1)) + /* Make sure things stay contiguous. */ + if (has_overlap(lp, freep, -1)) make_contiguous(lp); } @@ -716,8 +714,7 @@ getoff2: } /* Make sure things stay contiguous. */ - if (DL_GETPSIZE(pp) + DL_GETPOFFSET(pp) > ending_sector || - has_overlap(lp, freep, -1)) + if (has_overlap(lp, freep, -1)) make_contiguous(lp); } @@ -867,6 +864,7 @@ editor_change(struct disklabel *lp, u_int64_t *freep, char *p) if (get_size(lp, partno, freep, 0) != 0) return; + /* Make sure things stay contiguous. */ if (has_overlap(lp, freep, -1)) make_contiguous(lp); } |