sigar_proc_port_get for solaris 10+ only
This commit is contained in:
parent
4a61c20405
commit
ddc153b679
|
@ -2630,7 +2630,7 @@ static int find_port(sigar_t *sigar, struct ps_prochandle *phandle,
|
||||||
while ((ent = readdir(dirp))) {
|
while ((ent = readdir(dirp))) {
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (!isdigit(ent->d_name[0])) {
|
if (!sigar_isdigit(ent->d_name[0])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fd = atoi(ent->d_name);
|
fd = atoi(ent->d_name);
|
||||||
|
@ -2690,6 +2690,10 @@ int sigar_proc_port_get(sigar_t *sigar, int protocol,
|
||||||
sigar_proc_list_t pids;
|
sigar_proc_list_t pids;
|
||||||
int i, status, found=0;
|
int i, status, found=0;
|
||||||
|
|
||||||
|
if (sigar->solaris_version < 10) {
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((status = sigar_init_libproc(sigar)) != SIGAR_OK) {
|
if ((status = sigar_init_libproc(sigar)) != SIGAR_OK) {
|
||||||
return SIGAR_ENOTIMPL;
|
return SIGAR_ENOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue