diff options
Diffstat (limited to 'sys/ddb/db_access.c')
| -rw-r--r-- | sys/ddb/db_access.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c index 41d0d5ffc45..808de0b5c89 100644 --- a/sys/ddb/db_access.c +++ b/sys/ddb/db_access.c @@ -1,27 +1,27 @@ -/* $NetBSD: db_access.c,v 1.16 2001/11/12 22:54:03 lukem Exp $ */ +/* $NetBSD: db_access.c,v 1.17 2002/02/15 07:33:49 simonb Exp $ */ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.16 2001/11/12 22:54:03 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.17 2002/02/15 07:33:49 simonb Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -53,10 +53,7 @@ const int db_extend[] = { /* table for sign-extending */ }; db_expr_t -db_get_value(addr, size, is_signed) - db_addr_t addr; - size_t size; - boolean_t is_signed; +db_get_value(db_addr_t addr, size_t size, boolean_t is_signed) { char data[sizeof(db_expr_t)]; db_expr_t value; @@ -71,17 +68,14 @@ db_get_value(addr, size, is_signed) for (i = 0; i < size; i++) #endif /* BYTE_ORDER */ value = (value << 8) + (data[i] & 0xFF); - + if (size < 4 && is_signed && (value & db_extend[size]) != 0) value |= db_extend[size]; return (value); } void -db_put_value(addr, size, value) - db_addr_t addr; - size_t size; - db_expr_t value; +db_put_value(db_addr_t addr, size_t size, db_expr_t value) { char data[sizeof(db_expr_t)]; size_t i; |
