From 10787b675b8756470c5046fb21aa1439e12b01de Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 6 Jan 2014 21:00:55 +0000 Subject: [PATCH] In readsgilabel(), do not override the driver-provided initial geometry with the volume header geometry, if one is found. The driver knows better. This will allow a 2048-byte sector media to use a volume header using fake 512-byte sectors, and still be able to read the native label off it. --- sys/arch/sgi/sgi/disksubr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c index e0d1b112fcb..e242f194a80 100644 --- a/sys/arch/sgi/sgi/disksubr.c +++ b/sys/arch/sgi/sgi/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.29 2013/12/28 23:37:00 miod Exp $ */ +/* $OpenBSD: disksubr.c,v 1.30 2014/01/06 21:00:55 miod Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -151,11 +151,6 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *), return (EINVAL); /* sgilabel checksum error */ /* Spoof info from sgi label, in case there is no OpenBSD label. */ - DL_SETDSIZE(lp, (DL_GETDSIZE(lp)*lp->d_secsize) / dlp->dp.dp_secbytes); - lp->d_secsize = dlp->dp.dp_secbytes; - lp->d_nsectors = dlp->dp.dp_secs; - lp->d_ntracks = dlp->dp.dp_trks0; - lp->d_ncylinders = dlp->dp.dp_cyls; lp->d_npartitions = MAXPARTITIONS; for (i = 0; i < 16; i++) { -- 2.20.1