member, rather than a global. No functional change.
-/* $OpenBSD: xd.c,v 1.66 2015/01/14 19:02:59 miod Exp $ */
+/* $OpenBSD: xd.c,v 1.67 2015/01/14 21:13:46 miod Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
* start: disk label fix code (XXX)
*/
-static void *xd_labeldata;
-
static void
xddummystrat(bp)
struct buf *bp;
{
+ struct xd_softc *xd;
+
+ xd = (struct xd_softc *)xd_cd.cd_devs[DISKUNIT(bp->b_dev)];
if (bp->b_bcount != XDFM_BPS)
panic("xddummystrat");
- bcopy(xd_labeldata, bp->b_data, XDFM_BPS);
+ bcopy(xd->xd_labeldata, bp->b_data, XDFM_BPS);
bp->b_flags |= B_DONE;
}
lp->d_type = DTYPE_SMD;
/* We already have the label data in `b'; setup for dummy strategy */
- xd_labeldata = b;
+ xd->xd_labeldata = b;
error = readdisklabel(MAKEDISKDEV(0, xd->sc_dev.dv_unit, RAW_PART),
xddummystrat, lp, 0);
-/* $OpenBSD: xdvar.h,v 1.8 2014/07/11 16:35:40 jsg Exp $ */
+/* $OpenBSD: xdvar.h,v 1.9 2015/01/14 21:13:46 miod Exp $ */
/* $NetBSD: xdvar.h,v 1.5 1996/03/31 22:38:56 pk Exp $ */
/*
u_char nhead; /* number of heads */
u_char nsect; /* number of sectors per track */
u_char hw_spt; /* as above, but includes spare sectors */
+ void *xd_labeldata; /* temporary sector buffer */
struct dkbad dkb; /* bad144 sectors */
};
-/* $OpenBSD: xy.c,v 1.63 2015/01/14 19:02:59 miod Exp $ */
+/* $OpenBSD: xy.c,v 1.64 2015/01/14 21:13:46 miod Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
* start: disk label fix code (XXX)
*/
-static void *xy_labeldata;
-
static void
xydummystrat(bp)
struct buf *bp;
{
+ struct xy_softc *xy;
+
+ xy = (struct xy_softc *)xy_cd.cd_devs[DISKUNIT(bp->b_dev)];
if (bp->b_bcount != XYFM_BPS)
panic("xydummystrat");
- bcopy(xy_labeldata, bp->b_data, XYFM_BPS);
+ bcopy(xy->xy_labeldata, bp->b_data, XYFM_BPS);
bp->b_flags |= B_DONE;
}
lp->d_type = DTYPE_SMD;
/* We already have the label data in `b'; setup for dummy strategy */
- xy_labeldata = b;
+ xy->xy_labeldata = b;
error = readdisklabel(MAKEDISKDEV(0, xy->sc_dev.dv_unit, RAW_PART),
xydummystrat, lp, 0);
-/* $OpenBSD: xyvar.h,v 1.9 2014/07/11 16:35:40 jsg Exp $ */
+/* $OpenBSD: xyvar.h,v 1.10 2015/01/14 21:13:46 miod Exp $ */
/* $NetBSD: xyvar.h,v 1.4 1996/03/31 22:39:04 pk Exp $ */
/*
u_char nsect; /* number of sectors per track */
u_char hw_spt; /* as above, but includes spare sectors */
struct xy_iorq *xyrq; /* this disk's ioreq structure */
+ void *xy_labeldata; /* temporary sector buffer */
struct bufq xy_bufq; /* queue'd I/O requests */
struct dkbad dkb; /* bad144 sectors */
};