summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/disklabel/editor.c8
-rw-r--r--sys/arch/luna88k/luna88k/disksubr.c3
-rw-r--r--sys/arch/sgi/sgi/disksubr.c3
-rw-r--r--sys/arch/sparc/sparc/disksubr.c3
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c3
5 files changed, 12 insertions, 8 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index c6383404481..6039a04d8aa 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.207 2009/05/12 00:54:48 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.207 2009/05/12 00:54:48 krw Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.208 2009/05/13 01:31:58 krw Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -610,9 +610,9 @@ cylinderalign:
#ifdef SUN_CYLCHECK
if (lp->d_flags & D_VENDOR) {
/* Align chunk to cylinder boundaries. */
- chunksize -= cylsecs - chunkstart % cylsecs;
chunksize -= chunksize % cylsecs;
- chunkstart += cylsecs - chunkstart % cylsecs;
+ chunkstart = ((chunkstart + cylsecs - 1) / cylsecs) *
+ cylsecs;
}
#endif
/* See if partition can fit into chunk. */
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c
index b91f4288720..7b2f004ff7a 100644
--- a/sys/arch/luna88k/luna88k/disksubr.c
+++ b/sys/arch/luna88k/luna88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.38 2009/01/22 01:06:28 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.39 2009/05/13 01:31:58 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */
/*
@@ -113,6 +113,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *),
if ((msg = initdisklabel(lp)))
goto done;
+ lp->d_flags |= D_VENDOR;
/* get a buffer and initialize it */
bp = geteblk((int)lp->d_secsize);
diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c
index ecc6b148264..95728895095 100644
--- a/sys/arch/sgi/sgi/disksubr.c
+++ b/sys/arch/sgi/sgi/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 2008/09/01 16:28:50 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 2009/05/13 01:31:58 krw Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -62,6 +62,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *),
if ((msg = initdisklabel(lp)))
goto done;
+ lp->d_flags |= D_VENDOR;
/* get a buffer and initialize it */
bp = geteblk((int)lp->d_secsize);
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 7f37b389dfe..2b89a538017 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.79 2009/04/10 06:32:47 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.80 2009/05/13 01:31:58 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -76,6 +76,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *),
if ((msg = initdisklabel(lp)))
goto done;
+ lp->d_flags |= D_VENDOR;
/*
* On sparc64 we check for a CD label first, because our
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 6d43f696060..2bb7ddc9d67 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.54 2009/04/07 03:11:59 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.55 2009/05/13 01:31:58 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -69,6 +69,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *),
if ((msg = initdisklabel(lp)))
goto done;
+ lp->d_flags |= D_VENDOR;
/*
* On sparc64 we check for a CD label first, because our