54 |
|
#include <unistd.h> |
55 |
|
#endif |
56 |
|
|
57 |
< |
swap_stat_t *get_swap_stats(){ |
57 |
> |
sg_swap_stats *sg_get_swap_stats(){ |
58 |
|
|
59 |
< |
static swap_stat_t swap_stat; |
59 |
> |
static sg_swap_stats swap_stat; |
60 |
|
|
61 |
|
#ifdef SOLARIS |
62 |
|
struct anoninfo ai; |
98 |
|
return NULL; |
99 |
|
} |
100 |
|
|
101 |
< |
while ((line_ptr = f_read_line(f, "")) != NULL) { |
101 |
> |
while ((line_ptr = sg_f_read_line(f, "")) != NULL) { |
102 |
|
if (sscanf(line_ptr, "%*s %llu kB", &value) != 1) { |
103 |
|
continue; |
104 |
|
} |
141 |
|
return NULL; |
142 |
|
} |
143 |
|
#else |
144 |
< |
if((kvmd = get_kvm()) == NULL){ |
144 |
> |
if((kvmd = sg_get_kvm()) == NULL){ |
145 |
|
return NULL; |
146 |
|
} |
147 |
|
if ((kvm_getswapinfo(kvmd, &swapinfo, 1,0)) == -1){ |
156 |
|
swap_stat.free = swap_stat.total - swap_stat.used; |
157 |
|
#endif |
158 |
|
#if defined(NETBSD) || defined(OPENBSD) |
159 |
< |
if ((uvm = get_uvmexp()) == NULL) { |
159 |
> |
if ((uvm = sg_get_uvmexp()) == NULL) { |
160 |
|
return NULL; |
161 |
|
} |
162 |
|
|