diff options
Diffstat (limited to 'libshouldbeinlibc/xportinfo.c')
-rw-r--r-- | libshouldbeinlibc/xportinfo.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libshouldbeinlibc/xportinfo.c b/libshouldbeinlibc/xportinfo.c index cdd1da38..cce6fb6c 100644 --- a/libshouldbeinlibc/xportinfo.c +++ b/libshouldbeinlibc/xportinfo.c @@ -1,6 +1,6 @@ /* Print information about a port, with the name translated between tasks - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1999 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -18,6 +18,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <sys/types.h> +#include <sys/mman.h> + #include "portinfo.h" /* Prints info about NAME translated through X to STREAM, in a way described @@ -32,7 +35,7 @@ print_xlated_port_info (mach_port_t name, mach_port_type_t type, error_t err = port_name_xlator_xlate (x, name, type, &name, &type); if (! err) { - fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6x => " : "%6d => ", + fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6zx => " : "%6zd => ", old_name); err = print_port_info (name, type, x->to_task, show, stream); } @@ -59,10 +62,8 @@ print_xlated_task_ports_info (struct port_name_xlator *x, if (types[i] & only) print_xlated_port_info (names[i], types[i], x, show, stream); - vm_deallocate (mach_task_self (), - (vm_address_t)names, names_len * sizeof *names); - vm_deallocate (mach_task_self (), - (vm_address_t)types, types_len * sizeof *types); + munmap ((caddr_t) names, names_len * sizeof *names); + munmap ((caddr_t) types, types_len * sizeof *types); return 0; } |