diff options
Diffstat (limited to 'sbin/disklabel')
-rw-r--r-- | sbin/disklabel/editor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index dcd734c47c7..f2c3b0d991c 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.262 2012/01/02 03:46:39 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.263 2012/01/17 01:28:06 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -891,7 +891,8 @@ editor_add(struct disklabel *lp, char *p) if (get_offset(lp, partno) == 0 && get_size(lp, partno) == 0) { - fragsize = 2048; + fragsize = (lp->d_secsize == DEV_BSIZE) ? 2048 : + lp->d_secsize; new_size = DL_GETPSIZE(pp) * lp->d_secsize; if (new_size > 128ULL * 1024 * 1024 * 1024) fragsize *= 2; |