From: krw Date: Sat, 24 Feb 2018 21:00:00 +0000 (+0000) Subject: If you can modify p_cpg in when 'm'odifying a partition, you should be X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a626285594221a4770a264b5336296b45c987c68;p=openbsd 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@ --- 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. */