diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-02 19:10:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-06-02 19:10:20 +0000 |
commit | 095b9d2f9cd037c5ff4819f42bb8ffaa286c3f36 (patch) | |
tree | 6846969436902164fbc6b3f844e7f03a227b7c42 /sys | |
parent | 7ca5fbf43b3d5fc19ec5d7f5d4b2aba24135fecc (diff) |
Initialize the dv_unit, because disk_attach will want it later. Before
we were probably only ever reading labels off vnd0. Oops.
Spotted by matthew
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vnd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index fa7918073f9..54cb6d94066 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.118 2011/06/02 19:09:29 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.119 2011/06/02 19:10:19 deraadt Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -182,6 +182,7 @@ vndattach(int num) vnd_softc = (struct vnd_softc *)mem; for (i = 0; i < num; i++) { rw_init(&vnd_softc[i].sc_rwlock, "vndlock"); + vnd_softc[i].sc_dev.dv_unit = i; device_ref(&vnd_softc[i].sc_dev); } numvnd = num; |