Skip to contentSkip to conversation

btt: fix --do-active to not perform --q2d-latencies|-z

PATCH In review Steffen Maier 1 participant 1 message Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 21/31 btt: fix --do-active to not perform --q2d-latencies|-z

With flag NULL, val is returned from getopt_long().
Since long option --do-active is short option -Z, val should be capital 'Z' so the switch construct matches case 'Z' as for the short option. Otherwise --do-active would end up the same as -z which is --q2d-latencies. Fixes btt v2.09 in blktrace v1.0.2.

Fixes 2e37a10ee8b4 ("btt: Added in I/O activity per device and system-wide")
---
 btt/args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
btt/args.c +1 -1
index 5c5078ab2c81..4a3ab6fe1044 100644
@@ -191,7 +191,7 @@ static struct option l_opts[] = {
 		.name = "do-active",
 		.has_arg = no_argument,
 		.flag = NULL,
-		.val = 'z'
+		.val = 'Z'
 	},
 	{
 		.name = "easy-parse-avgs",
Signature · 1 line
2.14.2