From 1ae4089c6d8e646aa83187dfb13d8cd32a47b31d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 8 May 2002 09:22:33 +0000 Subject: 2002-05-07 Roland McGrath * host.c (ps_host_basic_info): int -> size_t (ps_host_basic_info, ps_host_load_info): Likewise. * ps.h: Update decls. (struct proc_stat): unsigned -> size_t for task_events_info_size, args_len, env_len. * procstat.c (summarize_thread_waits): Fix argument type. --- libps/host.c | 8 ++++---- libps/procstat.c | 2 +- libps/ps.h | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'libps') diff --git a/libps/host.c b/libps/host.c index 8fd83400..9a46e008 100644 --- a/libps/host.c +++ b/libps/host.c @@ -1,6 +1,6 @@ /* Routines to get global host info. - Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc. + Copyright (C) 1995,96,2001,02 Free Software Foundation, Inc. Written by Miles Bader @@ -58,7 +58,7 @@ ps_host_basic_info (host_basic_info_t *info) if (!initialized) { - int size = sizeof (buf); + size_t size = sizeof (buf); error_t err = host_info (ps_get_host (), HOST_BASIC_INFO, (host_info_t) &buf, &size); if (err) @@ -82,7 +82,7 @@ ps_host_sched_info (host_sched_info_t *info) if (!initialized) { - int size = sizeof (buf); + size_t size = sizeof (buf); error_t err = host_info (ps_get_host (), HOST_SCHED_INFO, (host_info_t) &buf, &size); if (err) @@ -102,7 +102,7 @@ error_t ps_host_load_info (host_load_info_t *info) { static host_load_info_data_t buf; - int size = sizeof (buf); + size_t size = sizeof (buf); error_t err = host_info (ps_get_host (), HOST_LOAD_INFO, (host_info_t) &buf, &size); diff --git a/libps/procstat.c b/libps/procstat.c index 46058e07..2398de5b 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -492,7 +492,7 @@ summarize_thread_states (struct procinfo *pi) /* Returns what's blocking the first blocked thread in PI in WAIT and RPC. */ static void summarize_thread_waits (struct procinfo *pi, char *waits, size_t waits_len, - char **wait, int *rpc) + char **wait, mach_msg_id_t *rpc) { int i; char *next_wait = waits; diff --git a/libps/ps.h b/libps/ps.h index 905d53a1..84015d31 100644 --- a/libps/ps.h +++ b/libps/ps.h @@ -1,6 +1,6 @@ /* Routines to gather and print process information. - Copyright (C) 1995,96,99,2001 Free Software Foundation, Inc. + Copyright (C) 1995,96,99,2001,02 Free Software Foundation, Inc. Written by Miles Bader @@ -257,13 +257,13 @@ struct proc_stat /* The process's argv, as a string with each element separated by '\0'. */ char *args; /* The length of ARGS. */ - unsigned args_len; + size_t args_len; /* Virtual memory statistics for the process, as returned by task_info; see for a description of task_events_info_t. */ task_events_info_t task_events_info; task_events_info_data_t task_events_info_buf; - unsigned task_events_info_size; + size_t task_events_info_size; /* Flags showing whether a field is vm_alloced or malloced. */ unsigned proc_info_vm_alloced : 1; @@ -300,7 +300,7 @@ struct proc_stat /* The process's envp, as a string with each element separated by '\0'. */ char *env; /* The length of ENV. */ - unsigned env_len; + size_t env_len; }; /* Proc_stat flag bits; each bit is set in the FLAGS field if that @@ -915,7 +915,7 @@ error_t proc_stat_list_merge (struct proc_stat_list *pp, returned in them. */ error_t proc_stat_list_add_all (struct proc_stat_list *pp, struct proc_stat ***proc_stats, - unsigned *num_procs); + size_t *num_procs); /* Add to PP entries for all processes in the login collection LOGIN_ID at its context. If an error occurs, the system error code is returned, @@ -924,7 +924,7 @@ error_t proc_stat_list_add_all (struct proc_stat_list *pp, error_t proc_stat_list_add_login_coll (struct proc_stat_list *pp, pid_t login_id, struct proc_stat ***proc_stats, - unsigned *num_procs); + size_t *num_procs); /* Add to PP entries for all processes in the session SESSION_ID at its context. If an error occurs, the system error code is returned, otherwise @@ -933,7 +933,7 @@ error_t proc_stat_list_add_login_coll (struct proc_stat_list *pp, error_t proc_stat_list_add_session (struct proc_stat_list *pp, pid_t session_id, struct proc_stat ***proc_stats, - unsigned *num_procs); + size_t *num_procs); /* Add to PP entries for all processes in the process group PGRP at its context. If an error occurs, the system error code is returned, otherwise @@ -941,7 +941,7 @@ error_t proc_stat_list_add_session (struct proc_stat_list *pp, resulting entries is returned in them. */ error_t proc_stat_list_add_pgrp (struct proc_stat_list *pp, pid_t pgrp, struct proc_stat ***proc_stats, - unsigned *num_procs); + size_t *num_procs); /* Try to set FLAGS in each proc_stat in PP (but they may still not be set -- you have to check). If a fatal error occurs, the error code is -- cgit v1.2.3