From a764cc22e2ec6aa52a0c9314f3fe6591a37c6db4 Mon Sep 17 00:00:00 2001 From: Johannes Bauer Date: Sun, 27 Jun 2021 12:54:28 +0200 Subject: [PATCH] Print timeout parameter of database Changed the list command to show the current timeout value. --- editor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor.c b/editor.c index 5e7d91f..f8fe1f3 100644 --- a/editor.c +++ b/editor.c @@ -241,7 +241,13 @@ static enum cmd_returncode_t cmd_list(struct editor_context_t *ctx, const char * const host_entry_t *host = &ctx->keydb->hosts[i]; char uuid[48]; sprintf_uuid(uuid, host->host_uuid); - printf(" Host %d: \"%s\" UUID %s -- %d volumes:\n", i + 1, host->host_name, uuid, host->volume_count); + printf(" Host %d: \"%s\" UUID %s -- %d volumes, ", i + 1, host->host_name, uuid, host->volume_count); + if (!host->client_default_timeout_secs) { + printf("no default timeout"); + } else { + printf("default timeout %d secs", host->client_default_timeout_secs); + } + printf(":\n\n"); for (unsigned int j = 0; j < host->volume_count; j++) { const volume_entry_t *volume = &host->volumes[j]; sprintf_uuid(uuid, volume->volume_uuid);