From: krw Date: Fri, 14 Oct 2022 16:36:36 +0000 (+0000) Subject: Fix botched D_SUNCYLCHECK+D_VENDOR check from r1.321. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=27b256bc33976845a48f3d6cb6056068ed237dd4;p=openbsd Fix botched D_SUNCYLCHECK+D_VENDOR check from r1.321. D_VENDOR lives in d_flags, not d_secpercyl. Makes resizing a partition more likely to respect cylinder rounding on sparc64. --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 47579948367..68bef780fea 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.375 2022/09/03 13:59:25 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.376 2022/10/14 16:36:36 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -751,7 +751,7 @@ editor_resize(struct disklabel *lp, char *p) } #ifdef SUN_CYLCHECK - if (lp->d_secpercyl & D_VENDOR) { + if (lp->d_flags & D_VENDOR) { u_int64_t cylsecs; cylsecs = lp->d_secpercyl; ui = ((ui + cylsecs - 1) / cylsecs) * cylsecs;