diff options
author | chuck <chuck@cvs.openbsd.org> | 1996-01-13 03:52:46 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1996-01-13 03:52:46 +0000 |
commit | 3eefa793b27e584054bd97de48420773ee3cb2bb (patch) | |
tree | f177549b30b15398257122f286e330f78e3aa811 /sys/arch/sun3/dev/xy.c | |
parent | f406b38f13aa881e9c0357ce5905c8868e7acd38 (diff) |
sync with sparc:
- move disk_attach() to before reading the disk label as per Jason.
otherwise we are reading into an unallocated buffer (oops!)
Diffstat (limited to 'sys/arch/sun3/dev/xy.c')
-rw-r--r-- | sys/arch/sun3/dev/xy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sun3/dev/xy.c b/sys/arch/sun3/dev/xy.c index 527f96d7824..b369e2bca85 100644 --- a/sys/arch/sun3/dev/xy.c +++ b/sys/arch/sun3/dev/xy.c @@ -36,7 +36,7 @@ * x y . c x y l o g i c s 4 5 0 / 4 5 1 s m d d r i v e r * * author: Chuck Cranor <chuck@ccrc.wustl.edu> - * id: $Id: xy.c,v 1.2 1996/01/12 20:21:06 deraadt Exp $ + * id: $Id: xy.c,v 1.3 1996/01/13 03:52:45 chuck Exp $ * started: 14-Sep-95 * references: [1] Xylogics Model 753 User's Manual * part number: 166-753-001, Revision B, May 21, 1988. @@ -565,6 +565,9 @@ xyattach(parent, self, aux) newstate = XY_DRIVE_NOLABEL; xy->hw_spt = spt = 0; /* XXX needed ? */ + /* Attach the disk: must be before getdisklabel to malloc label */ + disk_attach(&xy->sc_dk); + if (xygetdisklabel(xy, xa->dvmabuf) != XY_ERR_AOK) goto done; @@ -653,9 +656,6 @@ xyattach(parent, self, aux) bcopy(xa->dvmabuf, &xy->dkb, XYFM_BPS); } - /* Attach the disk. */ - disk_attach(&xy->sc_dk); - dk_establish(&xy->sc_dk, &xy->sc_dev); /* XXX */ done: |