@@ -65,11 +65,11 @@ #ifndef NO_GETOPT #include #endif #define BARLEN 35 #define HEADERLEN 14 -#define VERSION "0.8.6" +#define VERSION "0.8.7" extern char *optarg; extern int optind, opterr, optopt; @@ -119,26 +119,26 @@ #ifndef HAVE_LIBSTATGRAB struct sysinfo sinfo; meminfo_cached=get_meminfo("Cached:"); #else - mem_stat_t *mem_stats=NULL; - swap_stat_t *swap_stats=NULL; + sg_mem_stats *mem_stats=NULL; + sg_swap_stats *swap_stats=NULL; struct systeminfo_st { unsigned long totalram; /* Total usable main memory size */ unsigned long freeram; /* Available memory size */ unsigned long sharedram; /* Amount of shared memory */ unsigned long bufferram; /* Memory used by buffers */ unsigned long totalswap; /* Total swap space size */ unsigned long freeswap; /* swap space still available */ } sinfo; - statgrab_init(); + sg_init(); #ifdef HAVE_STATGRAB_DROP_PRIVILEGES /* Drop setuid/setgid privileges. */ - if (statgrab_drop_privileges() != 0) { + if (sg_drop_privileges() != 0) { perror("Error. Failed to drop privileges"); return 1; } #endif @@ -175,11 +175,11 @@ #endif while(1) { #ifndef HAVE_LIBSTATGRAB sysinfo(&sinfo); #else - if(((mem_stats=get_memory_stats()) == NULL) || (swap_stats=get_swap_stats()) == NULL) { + if(((mem_stats=sg_get_mem_stats()) == NULL) || (swap_stats=sg_get_swap_stats()) == NULL) { printf("Couldn't get memory information, exiting.\n"); return(-1); } meminfo_cached=mem_stats->cache; sinfo.totalram=mem_stats->total;