summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1999-03-14 19:31:19 +0000
committermillert <millert@openbsd.org>1999-03-14 19:31:19 +0000
commit0b75fc12c8e21bf108e895c13a1acda2a84a6327 (patch)
treea6719755eb6564d0c584837d3d57d2c9274262e0
parentAdding ${MASTER_SITE_GNOME} and ${MASTER_SITE_KDE} (diff)
downloadwireguard-openbsd-0b75fc12c8e21bf108e895c13a1acda2a84a6327.tar.xz
wireguard-openbsd-0b75fc12c8e21bf108e895c13a1acda2a84a6327.zip
Fix check for partition ending on a cylinder boundary. Previously it
checked for size being a mulitple of sectors/cylinder when you really want size+offset to be a mulitple of sectors/cylinder.
-rw-r--r--sbin/disklabel/disklabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index e1c83a35d5c..538b485b7c4 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.59 1999/03/07 03:05:31 deraadt Exp $ */
+/* $OpenBSD: disklabel.c,v 1.60 1999/03/14 19:31:19 millert Exp $ */
/* $NetBSD: disklabel.c,v 1.30 1996/03/14 19:49:24 ghudson Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char rcsid[] = "$OpenBSD: disklabel.c,v 1.59 1999/03/07 03:05:31 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: disklabel.c,v 1.60 1999/03/14 19:31:19 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -1054,7 +1054,7 @@ display_partition(f, lp, i, unit, width)
(pp->p_offset +
pp->p_size + lp->d_secpercyl - 1) /
lp->d_secpercyl - 1);
- if (pp->p_size % lp->d_secpercyl)
+ if ((pp->p_offset + pp->p_size) % lp->d_secpercyl)
putc('*', f);
putc(')', f);
}