Switch to single fprintf for output

(Logical change 1.18)
This commit is contained in:
osdl.org!shemminger 2004-06-09 18:09:48 +00:00
parent b7bdf69dc7
commit d7e0809ee6

View File

@ -544,21 +544,26 @@ int verify_forging(int fd)
return -1; return -1;
} }
static void usage(void) __attribute__((noreturn));
static void usage(void) static void usage(void)
{ {
printf("Usage: ifstat [OPTION] [ PATTERN [ PATTERN ] ]\n"); fprintf(stderr,
printf(" -h, --help this message\n"); "Usage: ifstat [OPTION] [ PATTERN [ PATTERN ] ]\n"
printf(" -a, --ignore ignore history\n"); " -h, --help this message\n"
printf(" -d, --scan=SECS sample every statistics every SECS\n"); " -a, --ignore ignore history\n"
printf(" -e, --errors show errors\n"); " -d, --scan=SECS sample every statistics every SECS\n"
printf(" -n, --nooutput do history only\n"); " -e, --errors show errors\n"
printf(" -r, --reset reset history\n"); " -n, --nooutput do history only\n"
printf(" -s, --noupdate don;t update history\n"); " -r, --reset reset history\n"
printf(" -t, --interval=SECS report average over the last SECS\n"); " -s, --noupdate don;t update history\n"
printf(" -V, --version output version information\n"); " -t, --interval=SECS report average over the last SECS\n"
printf(" -z, --zeros show entries with zero activity\n"); " -V, --version output version information\n"
printf(" -e, --errors show errors\n"); " -z, --zeros show entries with zero activity\n"
printf(" -z, --zeros show entries with zero activity\n"); " -e, --errors show errors\n"
" -z, --zeros show entries with zero activity\n");
exit(-1);
} }
static const struct option longopts[] = { static const struct option longopts[] = {
@ -628,7 +633,6 @@ int main(int argc, char *argv[])
case '?': case '?':
default: default:
usage(); usage();
exit(1);
} }
} }