From a626285594221a4770a264b5336296b45c987c68 Mon Sep 17 00:00:00 2001 From: krw Date: Sat, 24 Feb 2018 21:00:00 +0000 Subject: [PATCH] If you can modify p_cpg in when 'm'odifying a partition, you should be able to do the same when 'a'dding a partition. Only in 'X'pert mode of course. ok otto@ --- sbin/disklabel/editor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 0d449d1d22d..2f64475039e 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.311 2018/02/23 21:39:58 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.312 2018/02/24 21:00:00 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -901,7 +901,8 @@ editor_add(struct disklabel *lp, char *p) if (get_fstype(lp, partno) == 0 && get_mp(lp, partno) == 0 && get_fsize(lp, partno) == 0 && - get_bsize(lp, partno) == 0) + get_bsize(lp, partno) == 0 && + get_cpg(lp, partno) == 0) return; } /* Bailed out at some point, so effectively delete the partition. */ -- 2.20.1