char *sccsid(void) { return (SCCSID); }
#endif
+#ifdef TEST
+void int_handler(int n) { return; }
+#endif
+
unsigned long long uptime_cs[2] = {0, 0};
struct cifs_stats *st_cifs[2];
struct io_hdr_stats *st_hdr_cifs;
int cifs_nr = 0; /* Nb of CIFS mounted directories found */
int cpu_nr = 0; /* Nb of processors on the machine */
int flags = 0; /* Flag for common options and system state */
+int dplaces_nr = -1; /* Number of decimal places */
long interval = 0;
char timestamp[TIMESTAMP_LEN];
#ifdef DEBUG
fprintf(stderr, _("Options are:\n"
- "[ --human ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ --debuginfo ]\n"));
+ "[ --dec={ 0 | 1 | 2 } ] [ --human ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ --debuginfo ]\n"));
#else
fprintf(stderr, _("Options are:\n"
- "[ --human ] [ -h ] [ -k | -m ] [ -t ] [ -V ]\n"));
+ "[ --dec={ 0 | 1 | 2 } ] [ --human ] [ -h ] [ -k | -m ] [ -t ] [ -V ]\n"));
#endif
exit(1);
}
opt++;
}
+ else if (!strncmp(argv[opt], "--dec=", 6) && (strlen(argv[opt]) == 7)) {
+ /* Get number of decimal places */
+ dplaces_nr = atoi(argv[opt] + 6);
+ if ((dplaces_nr < 0) || (dplaces_nr > 2)) {
+ usage(argv[0]);
+ }
+ opt++;
+ }
+
else if (!strncmp(argv[opt], "-", 1)) {
for (i = 1; *(argv[opt] + i); i++) {
get_localtime(&rectime, 0);
/* Get system name, release number and hostname */
- uname(&header);
+ __uname(&header);
if (print_gal_header(&rectime, header.sysname, header.release,
header.nodename, header.machine, cpu_nr,
PLAIN_OUTPUT)) {