From e8115f3fe1cab872b5aff0873228cb5f9f5f2a36 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 4 Jun 2009 21:57:57 +0000 Subject: More fallback from struct disklabel changes, yawn --- sys/arch/mvme68k/mvme68k/disksubr.c | 44 ++++------------------------------- sys/arch/mvme68k/stand/libsa/bugdev.c | 27 +-------------------- sys/arch/mvme88k/mvme88k/disksubr.c | 44 ++++------------------------------- sys/arch/mvme88k/stand/libsa/bugdev.c | 27 +-------------------- sys/arch/sgi/stand/sgivol/sgivol.c | 4 ++-- 5 files changed, 14 insertions(+), 132 deletions(-) (limited to 'sys') diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index 52dc3c1f520..bb66ddd730e 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.63 2008/06/12 06:58:36 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.64 2009/06/04 21:57:56 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -165,22 +165,10 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp) clp->rpm = lp->d_rpm; clp->cfg_ilv = lp->d_interleave; - clp->cfg_sof = lp->d_trackskew; - clp->cylskew = lp->d_cylskew; - clp->headswitch = lp->d_headswitch; - - /* this silly table is for winchester drives */ - if (lp->d_trkseek < 6) - clp->cfg_ssr = 0; - else if (lp->d_trkseek < 10) - clp->cfg_ssr = 1; - else if (lp->d_trkseek < 15) - clp->cfg_ssr = 2; - else if (lp->d_trkseek < 20) - clp->cfg_ssr = 3; - else - clp->cfg_ssr = 4; - + clp->cfg_sof = 1; + clp->cylskew = 1; + clp->headswitch = 0; + clp->cfg_ssr = 0; clp->flags = lp->d_flags; for (i = 0; i < NDDATA; i++) clp->drivedata[i] = lp->d_drivedata[i]; @@ -229,28 +217,6 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) lp->d_acylinders = clp->acylinders; lp->d_rpm = clp->rpm; lp->d_interleave = clp->cfg_ilv; - lp->d_trackskew = clp->cfg_sof; - lp->d_cylskew = clp->cylskew; - lp->d_headswitch = clp->headswitch; - - /* this silly table is for winchester drives */ - switch (clp->cfg_ssr) { - case 1: - lp->d_trkseek = 6; - break; - case 2: - lp->d_trkseek = 10; - break; - case 3: - lp->d_trkseek = 15; - break; - case 4: - lp->d_trkseek = 20; - break; - default: - lp->d_trkseek = 0; - } - lp->d_flags = clp->flags; for (i = 0; i < NDDATA; i++) lp->d_drivedata[i] = clp->drivedata[i]; diff --git a/sys/arch/mvme68k/stand/libsa/bugdev.c b/sys/arch/mvme68k/stand/libsa/bugdev.c index aa9aaec8d17..a17616a4608 100644 --- a/sys/arch/mvme68k/stand/libsa/bugdev.c +++ b/sys/arch/mvme68k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.4 2007/06/17 00:28:56 deraadt Exp $ */ +/* $OpenBSD: bugdev.c,v 1.5 2009/06/04 21:57:56 miod Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -183,31 +183,6 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) lp->d_acylinders = clp->acylinders; lp->d_rpm = clp->rpm; lp->d_interleave = clp->cfg_ilv; - lp->d_trackskew = clp->cfg_sof; - lp->d_cylskew = clp->cylskew; - lp->d_headswitch = clp->headswitch; - - /* this silly table is for winchester drives */ - switch (clp->cfg_ssr) { - case 0: - lp->d_trkseek = 0; - break; - case 1: - lp->d_trkseek = 6; - break; - case 2: - lp->d_trkseek = 10; - break; - case 3: - lp->d_trkseek = 15; - break; - case 4: - lp->d_trkseek = 20; - break; - default: - lp->d_trkseek = 0; - break; - } lp->d_flags = clp->flags; for (i = 0; i < NDDATA; i++) lp->d_drivedata[i] = clp->drivedata[i]; diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 07bfbf6ff33..3f11a1f918b 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.59 2008/06/12 06:58:36 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.60 2009/06/04 21:57:56 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -166,22 +166,10 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp) clp->rpm = lp->d_rpm; clp->cfg_ilv = lp->d_interleave; - clp->cfg_sof = lp->d_trackskew; - clp->cylskew = lp->d_cylskew; - clp->headswitch = lp->d_headswitch; - - /* this silly table is for winchester drives */ - if (lp->d_trkseek < 6) - clp->cfg_ssr = 0; - else if (lp->d_trkseek < 10) - clp->cfg_ssr = 1; - else if (lp->d_trkseek < 15) - clp->cfg_ssr = 2; - else if (lp->d_trkseek < 20) - clp->cfg_ssr = 3; - else - clp->cfg_ssr = 4; - + clp->cfg_sof = 1; + clp->cylskew = 1; + clp->headswitch = 0; + clp->cfg_ssr = 0; clp->flags = lp->d_flags; for (i = 0; i < NDDATA; i++) clp->drivedata[i] = lp->d_drivedata[i]; @@ -230,28 +218,6 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) lp->d_acylinders = clp->acylinders; lp->d_rpm = clp->rpm; lp->d_interleave = clp->cfg_ilv; - lp->d_trackskew = clp->cfg_sof; - lp->d_cylskew = clp->cylskew; - lp->d_headswitch = clp->headswitch; - - /* this silly table is for winchester drives */ - switch (clp->cfg_ssr) { - case 1: - lp->d_trkseek = 6; - break; - case 2: - lp->d_trkseek = 10; - break; - case 3: - lp->d_trkseek = 15; - break; - case 4: - lp->d_trkseek = 20; - break; - default: - lp->d_trkseek = 0; - } - lp->d_flags = clp->flags; for (i = 0; i < NDDATA; i++) lp->d_drivedata[i] = clp->drivedata[i]; diff --git a/sys/arch/mvme88k/stand/libsa/bugdev.c b/sys/arch/mvme88k/stand/libsa/bugdev.c index 5f03dec27f6..944a73f213b 100644 --- a/sys/arch/mvme88k/stand/libsa/bugdev.c +++ b/sys/arch/mvme88k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.4 2007/06/17 00:28:56 deraadt Exp $ */ +/* $OpenBSD: bugdev.c,v 1.5 2009/06/04 21:57:56 miod Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -198,31 +198,6 @@ cputobsdlabel(lp, clp) lp->d_acylinders = clp->acylinders; lp->d_rpm = clp->rpm; lp->d_interleave = clp->cfg_ilv; - lp->d_trackskew = clp->cfg_sof; - lp->d_cylskew = clp->cylskew; - lp->d_headswitch = clp->headswitch; - - /* this silly table is for winchester drives */ - switch (clp->cfg_ssr) { - case 0: - lp->d_trkseek = 0; - break; - case 1: - lp->d_trkseek = 6; - break; - case 2: - lp->d_trkseek = 10; - break; - case 3: - lp->d_trkseek = 15; - break; - case 4: - lp->d_trkseek = 20; - break; - default: - lp->d_trkseek = 0; - break; - } lp->d_flags = clp->flags; for (i = 0; i < NDDATA; i++) lp->d_drivedata[i] = clp->drivedata[i]; diff --git a/sys/arch/sgi/stand/sgivol/sgivol.c b/sys/arch/sgi/stand/sgivol/sgivol.c index 888e1cb471f..002204319d1 100644 --- a/sys/arch/sgi/stand/sgivol/sgivol.c +++ b/sys/arch/sgi/stand/sgivol/sgivol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sgivol.c,v 1.14 2009/05/14 18:55:41 miod Exp $ */ +/* $OpenBSD: sgivol.c,v 1.15 2009/06/04 21:57:56 miod Exp $ */ /* $NetBSD: sgivol.c,v 1.8 2003/11/08 04:59:00 sekiya Exp $ */ /*- @@ -303,7 +303,7 @@ init_volhdr(void) volhdr->root = htobe16(0); volhdr->swap = htobe16(1); strlcpy(volhdr->bootfile, "/bsd", sizeof(volhdr->bootfile)); - volhdr->dp.dp_skew = lbl.d_trackskew; + volhdr->dp.dp_skew = 1; /* XXX */ volhdr->dp.dp_gap1 = 1; /* XXX */ volhdr->dp.dp_gap2 = 1; /* XXX */ volhdr->dp.dp_cyls = htobe16(lbl.d_ncylinders); -- cgit v1.2.3