summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-01-06 21:00:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-01-06 21:00:56 +0000
commit90c22cc6f96a4a539e26364c9ea20e6177d8e098 (patch)
treebbda8cbe83f1ce5d80d215841b4d226ad31d35c3 /sys/arch/sgi
parented88b4cf885350db88c78aed6a0c969b999eb72a (diff)
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.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/sgi/disksubr.c7
1 files changed, 1 insertions, 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++) {