ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/swap_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/swap_stats.c (file contents):
Revision 1.17 by tdb, Sun Apr 4 21:54:49 2004 UTC vs.
Revision 1.18 by ats, Mon Apr 5 15:40:15 2004 UTC

# Line 54 | Line 54
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;
# Line 98 | Line 98 | swap_stat_t *get_swap_stats(){
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                  }
# Line 141 | Line 141 | swap_stat_t *get_swap_stats(){
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){
# Line 156 | Line 156 | swap_stat_t *get_swap_stats(){
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines