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

Comparing projects/libstatgrab/src/libstatgrab/os_info.c (file contents):
Revision 1.20 by tdb, Mon Nov 1 18:30:17 2004 UTC vs.
Revision 1.21 by ats, Sat Nov 6 14:55:53 2004 UTC

# Line 58 | Line 58 | sg_host_info *sg_get_host_info(){
58          static struct utsname os;
59  
60   #ifdef HPUX
61 <        struct pst_static pstat_static;
61 >        struct pst_static *pstat_static;
62          time_t currtime;
63          long boottime;
64   #endif
# Line 91 | Line 91 | sg_host_info *sg_get_host_info(){
91  
92          /* get uptime */
93   #ifdef HPUX
94 <        if (pstat_getstatic(&pstat_static, sizeof(pstat_static), 1, 0) == -1) {
95 <                sg_set_error_with_errno(SG_ERROR_PSTAT, "pstat_static");
94 >        pstat_static = sg_get_pstat_static();
95 >        if (pstat_static == NULL) {
96                  return NULL;
97          }
98  
99          currtime = time(NULL);
100  
101 <        boottime = pstat_static.boot_time;
101 >        boottime = pstat_static->boot_time;
102  
103          general_stat.uptime = currtime - boottime;
104   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines