summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-03 23:56:15 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-03 23:56:15 +0000
commit84c05469b0378c17726a054d7486943ef197b423 (patch)
tree57ac8a2d08bf7510e5468b53c0cc5d8bbc6e9050
parent5798491126bcb231c4fbd5a9675bae036146ad01 (diff)
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* login.c (cat): Use munmap instead of vm_deallocate. (check_owned): Likewise. (kill_login): Likewise. * storeread.c (main): Likewise. * showtrans.c (main): Likewise. * pids.c (add_fn_pids): Likewise. * msgport.c (cmd_getenv): Likewise.
-rw-r--r--utils/ChangeLog10
-rw-r--r--utils/login.c6
-rw-r--r--utils/msgport.c4
-rw-r--r--utils/pids.c5
-rw-r--r--utils/showtrans.c5
-rw-r--r--utils/storeread.c4
6 files changed, 21 insertions, 13 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog
index ba41cfb5..65a20c3c 100644
--- a/utils/ChangeLog
+++ b/utils/ChangeLog
@@ -1,3 +1,13 @@
+1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * login.c (cat): Use munmap instead of vm_deallocate.
+ (check_owned): Likewise.
+ (kill_login): Likewise.
+ * storeread.c (main): Likewise.
+ * showtrans.c (main): Likewise.
+ * pids.c (add_fn_pids): Likewise.
+ * msgport.c (cmd_getenv): Likewise.
+
1999-07-01 Mark Kettenis <kettenis@gnu.org>
* Makefile (INSTALL-addauth-ops, INSTALL-setauth-ops,
diff --git a/utils/login.c b/utils/login.c
index ddcbadf9..d107a425 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -139,7 +139,7 @@ cat (mach_port_t node, char *str)
{
write (0, data, data_len);
if (data != buf)
- vm_deallocate (mach_task_self (), (vm_address_t)data, data_len);
+ munmap (data, data_len);
}
}
if (err)
@@ -271,7 +271,7 @@ check_owned (process_t proc_server, pid_t pid, int *owned)
{
*owned = !(pi->state & PI_NOTOWNED);
if (pi != &_pi)
- vm_deallocate (mach_task_self (), (vm_address_t)pi, pi_size);
+ munmap (pi, pi_size);
}
return err;
@@ -296,7 +296,7 @@ kill_login (process_t proc_server, pid_t pid, int sig)
if (pids[i] != self)
kill (pids[i], sig);
if (pids != _pids)
- vm_deallocate (mach_task_self (), (vm_address_t)pids, num_pids);
+ munmap (pids, num_pids);
}
}
while (!err && num_pids > 0);
diff --git a/utils/msgport.c b/utils/msgport.c
index eed174b7..5f494e1c 100644
--- a/utils/msgport.c
+++ b/utils/msgport.c
@@ -1,6 +1,6 @@
/* Send messages to selected processes
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Written by Jose M. Moya <josem@gnu.org>
@@ -125,7 +125,7 @@ cmd_getenv (pid_t pid, mach_port_t msgport, int argc, char *argv[])
printf ("%d: %s\n", pid, p);
}
if (data != buf)
- vm_deallocate (mach_task_self (), (vm_address_t)data, len);
+ munmap (data, len);
return err;
}
diff --git a/utils/pids.c b/utils/pids.c
index ea759247..5e80a767 100644
--- a/utils/pids.c
+++ b/utils/pids.c
@@ -1,6 +1,6 @@
/* Pid parsing/frobbing
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -65,8 +65,7 @@ add_fn_pids (pid_t **pids, size_t *num_pids, unsigned id,
else
err = ENOMEM;
if (new_pids != _new_pids)
- vm_deallocate (mach_task_self (), (vm_address_t)new_pids,
- num_new_pids * sizeof (pid_t));
+ munmap (new_pids, num_new_pids * sizeof (pid_t));
}
return err;
diff --git a/utils/showtrans.c b/utils/showtrans.c
index 74da61fa..d990b6c9 100644
--- a/utils/showtrans.c
+++ b/utils/showtrans.c
@@ -1,6 +1,6 @@
/* Show files' passive translators.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -85,8 +85,7 @@ main (int argc, char *argv[])
}
if (trans != buf)
- vm_deallocate (mach_task_self (),
- (vm_address_t)trans, trans_len);
+ munmap (trans, trans_len);
status = 0;
diff --git a/utils/storeread.c b/utils/storeread.c
index 51336275..faae7225 100644
--- a/utils/storeread.c
+++ b/utils/storeread.c
@@ -1,6 +1,6 @@
/* Write portions of a store to stdout
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This file is part of the GNU Hurd.
@@ -54,7 +54,7 @@ main (int argc, char **argv)
if (write (1, data, data_len) < 0)
error (6, errno, "stdout");
if (data != buf)
- vm_deallocate (mach_task_self (), (vm_address_t)data, data_len);
+ munmap (data, data_len);
}
error_t parse_opt (int key, char *arg, struct argp_state *state)