From: Sebastien GODARD Date: Sat, 20 Jul 2019 08:28:16 +0000 (+0200) Subject: iostat: Fix issue when a UUID is given on the command line X-Git-Tag: v12.1.6~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7440dca25ea4c4fc208c1f4e455e6df1c6190565;p=sysstat iostat: Fix issue when a UUID is given on the command line A command like "iostat -j UUID 2578463f-6947-48c7-8b09-876a4145cfb1 1 2" didn't work because the UUID name was considered as the interval of time to use. This patch fixes the problem. Signed-off-by: Sebastien GODARD --- diff --git a/iostat.c b/iostat.c index cbb586e..153462f 100644 --- a/iostat.c +++ b/iostat.c @@ -2033,7 +2033,7 @@ int main(int argc, char **argv) opt++; } - else if (!isdigit(argv[opt][0])) { + else if (strspn(argv[opt], DIGITS) != strlen(argv[opt])) { /* * By default iostat doesn't display unused devices. * If some devices are explicitly entered on the command line