From 99df11e0d1750310eca42e2e824c9768dd270df5 Mon Sep 17 00:00:00 2001 From: miod Date: Sat, 28 Dec 2013 23:37:00 +0000 Subject: [PATCH] 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. --- sys/arch/sgi/sgi/disksubr.c | 8 +++----- 1 file 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) { -- 2.20.1