From 1830454b49f417b5e925b8c3cc3c6b3cdc764535 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 9 Apr 2011 21:36:52 -0300 Subject: [PATCH] atrf-xtal.c (usage, main): renamed option "d" (dump) to "r" (dump raw) --- tools/atrf-xtal/atrf-xtal.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/atrf-xtal/atrf-xtal.c b/tools/atrf-xtal/atrf-xtal.c index 67d4b09..3085d91 100644 --- a/tools/atrf-xtal/atrf-xtal.c +++ b/tools/atrf-xtal/atrf-xtal.c @@ -83,8 +83,8 @@ static void eval(unsigned *res, int rep) static void usage(const char *name) { fprintf(stderr, -"%s [-d] [-s size] [-t trim] [repetitions]\n" -" -d instead of printing a mean value, dump all samples\n" +"%s [-r] [-s size] [-t trim] [repetitions]\n" +" -r instead of printing a mean value, dump the raw samples\n" " -s size payload size in bytes, 0-127 (default: %d bytes)\n" " -t trim trim capacitor setting, 0-15 (default: %d)\n" " repetitions number of measurements (default: 1)\n" @@ -99,15 +99,15 @@ int main(int argc, char *const *argv) int size = DEFAULT_SIZE; int trim = DEFAULT_TRIM; int rep = 1; - int dump = 0; + int dump_raw = 0; char *end; unsigned *res; int c, i; - while ((c = getopt(argc, argv, "ds:t:")) != EOF) + while ((c = getopt(argc, argv, "rs:t:")) != EOF) switch (c) { - case 'd': - dump = 1; + case 'r': + dump_raw = 1; break; case 's': size = strtoul(optarg, &end, 0); @@ -158,7 +158,7 @@ int main(int argc, char *const *argv) atrf_close(dsc); - if (dump) { + if (dump_raw) { for (i = 0; i != rep; i++) printf("%u\n", res[i]); exit(0);