Skip to content

Commit

Permalink
1999-07-03 Thomas Bushnell, BSG <[email protected]>
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Thomas Bushnell committed Jul 3, 1999
1 parent 5798491 commit 84c0546
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
10 changes: 10 additions & 0 deletions utils/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
1999-07-03 Thomas Bushnell, BSG <[email protected]>

* 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 <[email protected]>

* Makefile (INSTALL-addauth-ops, INSTALL-setauth-ops,
Expand Down
6 changes: 3 additions & 3 deletions utils/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions utils/msgport.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Expand Down Expand Up @@ -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;
}

Expand Down
5 changes: 2 additions & 3 deletions utils/pids.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions utils/showtrans.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions utils/storeread.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
This file is part of the GNU Hurd.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 84c0546

Please sign in to comment.