From 884a48d991e76ee217fba91ed2da662250cc6062 Mon Sep 17 00:00:00 2001 From: Rob N Date: Sat, 27 Jan 2024 09:41:31 +1100 Subject: [PATCH] zpool wait: print timestamp before the header list, status and iostat all display the -T timestamp before the header, but wait showed it after. Make it be like the others. Reported-by: Kyle Evans Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #15825 --- cmd/zpool/zpool_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index b347cfba97..11486f3f18 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -11042,6 +11042,9 @@ print_wait_status_row(wait_data_t *wd, zpool_handle_t *zhp, int row) col_widths[i] = MAX(strlen(headers[i]), 6) + 2; } + if (timestamp_fmt != NODATE) + print_timestamp(timestamp_fmt); + /* Print header if appropriate */ int term_height = terminal_height(); boolean_t reprint_header = (!wd->wd_headers_once && term_height > 0 && @@ -11116,9 +11119,6 @@ print_wait_status_row(wait_data_t *wd, zpool_handle_t *zhp, int row) if (vdev_any_spare_replacing(nvroot)) bytes_rem[ZPOOL_WAIT_REPLACE] = bytes_rem[ZPOOL_WAIT_RESILVER]; - if (timestamp_fmt != NODATE) - print_timestamp(timestamp_fmt); - for (i = 0; i < ZPOOL_WAIT_NUM_ACTIVITIES; i++) { char buf[64]; if (!wd->wd_enabled[i])