diff options
| author | 2019-02-21 14:36:42 +0000 | |
|---|---|---|
| committer | 2019-02-21 14:36:42 +0000 | |
| commit | ad90a7d1e038b6f58c528ca776d390bb71e24b8c (patch) | |
| tree | ab70d1f2dfb33da43b6dfa4dedf1e9fd789e2754 /sbin/disklabel/editor.c | |
| parent | type is not used here. Still keep a comment around to keep the code (diff) | |
| download | wireguard-openbsd-ad90a7d1e038b6f58c528ca776d390bb71e24b8c.tar.xz wireguard-openbsd-ad90a7d1e038b6f58c528ca776d390bb71e24b8c.zip | |
Compute params of shrunk partition and not of resized one; ok krw@
Diffstat (limited to 'sbin/disklabel/editor.c')
| -rw-r--r-- | sbin/disklabel/editor.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 7d105e10395..cce04280e24 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.353 2019/01/25 00:19:26 millert Exp $ */ +/* $OpenBSD: editor.c,v 1.354 2019/02/21 14:36:42 otto Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <millert@openbsd.org> @@ -795,10 +795,10 @@ editor_resize(struct disklabel *lp, char *p) DL_SETPOFFSET(pp, off); if (off + DL_GETPSIZE(pp) > ending_sector) { DL_SETPSIZE(pp, ending_sector - off); - pp->p_fragblock = 0; - if (get_fsize(&label, partno) == 1 || - get_bsize(&label, partno) == 1 || - get_cpg(&label, partno) == 1) + pp->p_fragblock = DISKLABELV1_FFS_FRAGBLOCK(0, 0); + if (get_fsize(&label, i) == 1 || + get_bsize(&label, i) == 1 || + get_cpg(&label, i) == 1) return; shrunk = i; } |
