From: miod Date: Mon, 6 Jan 2014 21:00:55 +0000 (+0000) Subject: In readsgilabel(), do not override the driver-provided initial geometry with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=10787b675b8756470c5046fb21aa1439e12b01de;p=openbsd 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. --- 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++) {