summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-12-28 23:37:01 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-12-28 23:37:01 +0000
commit0d435fc670b98c613788eb8ae6c9fb7a869f6925 (patch)
tree13bd2a7f3f3c97f8b59c3fed61280d56e9f6621b /sys/arch
parent389eee1edc63188308655dc448327e7795e5866d (diff)
The mips partition table in the volume header uses 512-byte logical units,
not sectors; don't multiply by the sector size to get the proper disk offsets. This will let install.iso be built with the OpenBSD label at the expected location, instead of within the ffs filesystem; we had been lucky enough the area being overwritten was not in use so far.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/sgi/disksubr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c
index 32739f3351d..e0d1b112fcb 100644
--- a/sys/arch/sgi/sgi/disksubr.c
+++ b/sys/arch/sgi/sgi/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.28 2013/10/23 11:19:32 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.29 2013/12/28 23:37:00 miod Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -134,10 +134,8 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *),
if (dlp->partitions[0].blocks == 0)
return (EINVAL);
- fsoffs = (long long)dlp->partitions[0].first *
- (dlp->dp.dp_secbytes / DEV_BSIZE);
- fsend = fsoffs + dlp->partitions[0].blocks *
- (dlp->dp.dp_secbytes / DEV_BSIZE);
+ fsoffs = (long long)dlp->partitions[0].first;
+ fsend = fsoffs + dlp->partitions[0].blocks;
/* Only came here to find the offset... */
if (partoffp) {