diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-10-17 23:05:40 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-10-17 23:05:40 +0000 |
commit | 05639299367f67accb26b3dfd824d2875323699a (patch) | |
tree | 9a277e787bcde2d6d136bcacb450087104eb9e63 /sys | |
parent | faedf7a876de9ee825ed44b1f6f9dcdbe056bdcd (diff) |
vndunit() wasn't quite right after last change, limiting vnds to 16.
apply fix from tom cosgrove to get the full range.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vnd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 6fde8e3e5ab..b9db2b4c385 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.40 2003/10/11 03:31:07 tedu Exp $ */ +/* $OpenBSD: vnd.c,v 1.41 2003/10/17 23:05:39 tedu Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -94,7 +94,11 @@ int vnddebug = 0x00; #define b_cylin b_resid -#define vndunit(x) DISKUNIT(minor(x) & 0x7ff) +/* + * vndunit is a bit weird. have to reconstitute the dev_t for + * DISKUNIT(), but with the minor masked off. + */ +#define vndunit(x) DISKUNIT(makedev(major(x), minor(x) & 0x7ff)) #define vndsimple(x) (minor(x) & 0x800) #define MAKEVNDDEV(maj, unit, part) MAKEDISKDEV(maj, unit, part) |