summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1998-04-25 07:17:12 +0000
committerderaadt <deraadt@openbsd.org>1998-04-25 07:17:12 +0000
commitdb152d816e9bf76bf5ed1c080905dbdbea1a7bf6 (patch)
treeee7324462f17cc7e5eb668789e48787e88663405
parentsync (diff)
downloadwireguard-openbsd-db152d816e9bf76bf5ed1c080905dbdbea1a7bf6.tar.xz
wireguard-openbsd-db152d816e9bf76bf5ed1c080905dbdbea1a7bf6.zip
DOSBBSECTOR is in sectors
-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 176d9fd34e0..9e7fe609530 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.50 1998/03/12 19:35:55 millert Exp $ */
+/* $OpenBSD: disklabel.c,v 1.51 1998/04/25 07:17:12 deraadt 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.50 1998/03/12 19:35:55 millert Exp $";
+static char rcsid[] = "$OpenBSD: disklabel.c,v 1.51 1998/04/25 07:17:12 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -588,7 +588,7 @@ readmbr(f)
* in for example mips processors.
*/
dp = (struct dos_partition *)mbr;
- if (lseek(f, (off_t)DOSBBSECTOR, SEEK_SET) < 0 ||
+ if (lseek(f, (off_t)DOSBBSECTOR * DEV_BSIZE, SEEK_SET) < 0 ||
read(f, mbr, sizeof(mbr)) < sizeof(mbr))
err(4, "can't read master boot record");