diff options
| author | christos <christos@NetBSD.org> | 2006-08-27 04:11:45 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2006-08-27 04:11:45 +0000 |
| commit | 5bb209df4336933fbb8830be38cadca85d6422fa (patch) | |
| tree | f1d0dd4e3c75d3eefbfb343cfd21045dda599fa0 /sys | |
| parent | 52bdc9cda3f4f87d37b857dd389aa8006c288c54 (diff) | |
Wedges don't have partitions.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/x86/x86/x86_autoconf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/x86/x86/x86_autoconf.c b/sys/arch/x86/x86/x86_autoconf.c index ad3ad06b1cf..6c00fe0f95a 100644 --- a/sys/arch/x86/x86/x86_autoconf.c +++ b/sys/arch/x86/x86/x86_autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: x86_autoconf.c,v 1.19 2006/08/13 00:56:37 christos Exp $ */ +/* $NetBSD: x86_autoconf.c,v 1.20 2006/08/27 04:11:45 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -70,7 +70,7 @@ opendisk(struct device *dv) { int bmajor; struct vnode *tmpvn; - int error; + int error, raw_part; /* * Lookup major number for disk block device. @@ -83,7 +83,8 @@ opendisk(struct device *dv) * Fake a temporary vnode for the disk, open it, and read * and hash the sectors. */ - if (bdevvp(MAKEDISKDEV(bmajor, device_unit(dv), RAW_PART), &tmpvn)) + raw_part = device_is_a(dv, "dk") * RAW_PART; + if (bdevvp(MAKEDISKDEV(bmajor, device_unit(dv), raw_part), &tmpvn)) panic("%s: can't alloc vnode for %s", __func__, dv->dv_xname); error = VOP_OPEN(tmpvn, FREAD, NOCRED, 0); if (error) { |
