From e92a9a8c5249bdbd01a46afe330f6ce9be65317b Mon Sep 17 00:00:00 2001 From: Tycho Nightingale Date: Tue, 9 Apr 2019 10:33:18 +0000 Subject: [PATCH] ioatcontrol(8) crc-copy flag bug and misc usage tweak Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19855 --- tools/tools/ioat/ioatcontrol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/tools/ioat/ioatcontrol.c b/tools/tools/ioat/ioatcontrol.c index 394f50430de..f76af5b0e76 100644 --- a/tools/tools/ioat/ioatcontrol.c +++ b/tools/tools/ioat/ioatcontrol.c @@ -49,7 +49,7 @@ static void usage(void) { - printf("Usage: %s [-c period] [-EfmVz] channel-number num-txns [ " + printf("Usage: %s [-c period] [-EefmVxXz] channel-number num-txns [ " "[ [duration]]]\n", getprogname()); printf(" %s -r [-c period] [-vVwz] channel-number address []\n\n", getprogname()); @@ -154,9 +154,11 @@ main(int argc, char **argv) break; case 'x': xflag = true; + modeflags++; break; case 'X': Xflag = true; + modeflags++; break; case 'z': t.zero_stats = true; @@ -172,7 +174,7 @@ main(int argc, char **argv) usage(); if (modeflags > 1) { - printf("Invalid: Cannot use >1 mode flag (-E, -f, -m, or -r)\n"); + printf("Invalid: Cannot use >1 mode flag (-E, -e, -f, -m, -r, -x or -X)\n"); usage(); } @@ -191,7 +193,7 @@ main(int argc, char **argv) t.testkind = IOAT_TEST_MEMCPY; else if (xflag) t.testkind = IOAT_TEST_DMA_CRC; - else if (xflag) + else if (Xflag) t.testkind = IOAT_TEST_DMA_CRC_COPY; t.channel_index = atoi(argv[0]);