summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2022-10-14 16:36:37 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2022-10-14 16:36:37 +0000
commitcce0e8551cf5a836f890fecdfd543f410fe6ed4e (patch)
tree0a2971d78261842fa4dd194a392ac0b497a96a53 /sbin
parent686f38c4d71469fd78345efbfb36f1ce5ef6c7e9 (diff)
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.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/disklabel/editor.c4
1 files changed, 2 insertions, 2 deletions
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 <millert@openbsd.org>
@@ -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;