Skip to content

Commit

Permalink
zpool wait: print timestamp before the header
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #15825
  • Loading branch information
robn authored Jan 26, 2024
1 parent aeb3377 commit 884a48d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit 884a48d

Please sign in to comment.