remove unused /proc/cred function.

fix proc_status function name.
This commit is contained in:
Doug MacEachern 2004-09-04 19:01:44 +00:00
parent ebf7fb5ced
commit 42f7549b49
3 changed files with 3 additions and 25 deletions

View File

@ -60,27 +60,7 @@ int sigar_proc_usage_get(sigar_t *sigar, prusage_t *prusage, sigar_pid_t pid)
return retval;
}
int sigar_get_cred_get(sigar_t *sigar, prcred_t *prcred, sigar_pid_t pid)
{
int fd, retval = SIGAR_OK;
char buffer[BUFSIZ];
(void)SIGAR_PROC_FILENAME(buffer, pid, "/cred");
if ((fd = open(buffer, O_RDONLY)) < 0) {
return ESRCH;
}
if (!my_pread(fd, prcred, prcred_t, 0)) {
retval = errno;
}
close(fd);
return retval;
}
int sigar_get_proc_status(sigar_t *sigar, pstatus_t *pstatus, sigar_pid_t pid)
int sigar_proc_status_get(sigar_t *sigar, pstatus_t *pstatus, sigar_pid_t pid)
{
int fd, retval = SIGAR_OK;
char buffer[BUFSIZ];

View File

@ -42,9 +42,7 @@ int sigar_proc_psinfo_get(sigar_t *sigar, sigar_pid_t pid);
int sigar_proc_usage_get(sigar_t *sigar, prusage_t *prusage, sigar_pid_t pid);
int sigar_get_cred_get(sigar_t *sigar, prcred_t *prcred, sigar_pid_t pid);
int sigar_get_proc_status(sigar_t *sigar, pstatus_t *pstatus, sigar_pid_t pid);
int sigar_proc_status_get(sigar_t *sigar, pstatus_t *pstatus, sigar_pid_t pid);
#define CPU_ONLINE(n) \
(p_online(n, P_STATUS) == P_ONLINE)

View File

@ -586,7 +586,7 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
/* XXX wtf? seen on solaris 10, only for the self process */
pstatus_t pstatus;
status = sigar_get_proc_status(sigar, &pstatus, pid);
status = sigar_proc_status_get(sigar, &pstatus, pid);
if (status != SIGAR_OK) {
return status;
}