Commit b5f31936 authored by John Kacur's avatar John Kacur Committed by Daniel Bristot de Oliveira
Browse files

tools/rtla: Exit with EXIT_SUCCESS when help is invoked

Fix rtla so that the following commands exit with 0 when help is invoked

rtla osnoise top -h
rtla osnoise hist -h
rtla timerlat top -h
rtla timerlat hist -h

Link: https://lore.kernel.org/linux-trace-devel/20240203001607.69703-1-jkacur@redhat.com



Cc: stable@vger.kernel.org
Fixes: 1eeb6328 ("rtla/timerlat: Add timerlat hist mode")
Signed-off-by: default avatarJohn Kacur <jkacur@redhat.com>
Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
parent 14f08c97
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -479,7 +479,11 @@ static void osnoise_hist_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+5 −1
Original line number Diff line number Diff line
@@ -331,7 +331,11 @@ static void osnoise_top_usage(struct osnoise_top_params *params, char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+5 −1
Original line number Diff line number Diff line
@@ -545,7 +545,11 @@ static void timerlat_hist_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+5 −1
Original line number Diff line number Diff line
@@ -375,7 +375,11 @@ static void timerlat_top_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*