From 66b777e605779e3a35f814aa4a889fc7f72ce565 Mon Sep 17 00:00:00 2001 From: Maciej Szwed Date: Wed, 22 Apr 2020 10:42:30 +0200 Subject: [PATCH] spdk_top: Add TAB hotkey to switch tabs Signed-off-by: Maciej Szwed Change-Id: I5a9a035b74c9b7e289c3995ba246273f56ad128a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1967 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- app/spdk_top/spdk_top.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/spdk_top/spdk_top.c b/app/spdk_top/spdk_top.c index b3be68e43..ca20e4420 100644 --- a/app/spdk_top/spdk_top.c +++ b/app/spdk_top/spdk_top.c @@ -1767,6 +1767,15 @@ show_stats(void) current_page = 0; switch_tab(active_tab); break; + case '\t': + if (active_tab < NUMBER_OF_TABS - 1) { + active_tab++; + } else { + active_tab = THREADS_TAB; + } + current_page = 0; + switch_tab(active_tab); + break; case 's': change_sorting(active_tab); break;