summaryrefslogtreecommitdiff
path: root/sbin/disklabel/disklabel.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-03-14 19:31:20 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-03-14 19:31:20 +0000
commit79dce02c2cdb39ae26245dab85aadbd2510d7d5e (patch)
tree489187c900cd41d896dd93fd27532e80ec5afb6b /sbin/disklabel/disklabel.c
parent9f99eb6adc8fa069ffebbaff863749c4142671ae (diff)
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.
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-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);
}