--- projects/libstatgrab/src/saidar/saidar.c 2003/10/09 16:08:16 1.3 +++ projects/libstatgrab/src/saidar/saidar.c 2003/10/16 17:54:44 1.6 @@ -247,7 +247,6 @@ void display_data(){ printw("%5d", stats.user_stats->num_entries); /* Mem */ - move(6, 12); printw("%7s", size_conv(stats.mem_stats->total)); move(7, 12); @@ -315,6 +314,7 @@ void display_data(){ network_stat_ptr++; } + /* Disk */ disk_stat_ptr = stats.disk_stats; for(counter=0;counteravail)); move(13+stats.network_entries+counter, 73); - printw("%5.2f%%", 100.00 * ((float)disk_stat_ptr->used / (float)disk_stat_ptr->size)); + printw("%5.2f%%", 100.00 * ((float) (disk_stat_ptr->size - disk_stat_ptr->avail) / (float) disk_stat_ptr->size)); disk_stat_ptr++; } @@ -353,7 +353,7 @@ int get_stats(){ } void version_num(char *progname){ - fprintf(stderr, "%s version %s\n", PACKAGE_VERSION); + fprintf(stderr, "%s version %s\n", progname, PACKAGE_VERSION); fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); exit(1); } @@ -361,7 +361,7 @@ void version_num(char *progname){ void usage(char *progname){ fprintf(stderr, "Usage: %s [-d delay] [-v] [-h]\n\n", progname); fprintf(stderr, " -d Sets the update time in seconds\n"); - fprintf(stderr, " -v Prints version number\n"); + fprintf(stderr, " -v Prints version number\n"); fprintf(stderr, " -h Displays this help information.\n"); fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); exit(1); @@ -385,7 +385,7 @@ int main(int argc, char **argv){ int delay=2; - while ((c = getopt(argc, argv, "d:")) != EOF){ + while ((c = getopt(argc, argv, "vhd:")) != EOF){ switch (c){ case 'd': delay = atoi(optarg);