diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-05-18 13:14:43 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-05-18 13:14:43 +0000 |
commit | a2e0f6b31fd28f656616c6ce9712f164e419cdd2 (patch) | |
tree | cdd062b5b5ecd003c76b48b22ab53169cb64ee5c /sys/kern/kern_conf.c | |
parent | 6e18f0038bd1e4f400bebb63a5dd2aea10d6a963 (diff) | |
download | FreeBSD-src-a2e0f6b31fd28f656616c6ce9712f164e419cdd2.zip FreeBSD-src-a2e0f6b31fd28f656616c6ce9712f164e419cdd2.tar.gz |
Avoid negative numbers in dev_t manipulation. This should fix recent MFS
related crashes.
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index f7477d8..ecf5ffd 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_conf.c,v 1.38 1999/05/12 11:06:45 phk Exp $ + * $Id: kern_conf.c,v 1.39 1999/05/12 13:06:34 phk Exp $ */ #include <sys/param.h> @@ -182,7 +182,7 @@ major(dev_t x) uintptr_t i = (uintptr_t)x; #ifdef DEVT_FASCIST - return(253 - ((i >> 8) & 0xff)); + return(255 - ((i >> 8) & 0xff)); #else return((i >> 8) & 0xff); #endif @@ -200,7 +200,7 @@ dev_t makedev(int x, int y) { #ifdef DEVT_FASCIST - return ((dev_t) (((253 - x) << 8) | y)); + return ((dev_t) (((255 - x) << 8) | y)); #else return ((dev_t) ((x << 8) | y)); #endif |