From 49c978a9e89691f98993a5d91d30efcd754fd0ac Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 7 Feb 2023 19:18:12 +0100 Subject: [PATCH] Add filesystem type in disk usage warning (if available) Signed-off-by: DL6ER --- src/database/message-table.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/database/message-table.c b/src/database/message-table.c index ede35e2e..376623cb 100644 --- a/src/database/message-table.c +++ b/src/database/message-table.c @@ -689,9 +689,11 @@ void log_resource_shortage(const double load, const int nprocs, const int shmem, // Create plain message if(fsdetails != NULL) - ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on filesystem mounted at %s", disk, msg, fsdetails->mnt_dir); + ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on %s filesystem mounted at %s", + disk, msg, fsdetails->mnt_type, fsdetails->mnt_dir); else - ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on partition containing the file %s", disk, msg, path); + ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on partition containing the file %s", + disk, msg, path); if(ret > sizeof(buf)) log_warn("log_resource_shortage(): Buffer too small to hold plain message, warning truncated"); @@ -707,8 +709,8 @@ void log_resource_shortage(const double load, const int nprocs, const int shmem, // Create HTML message if(fsdetails != NULL) - ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on filesystem mounted at %s", - disk, msg, fsdetails->mnt_dir); + ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on %s filesystem mounted at %s", + disk, msg, fsdetails->mnt_type, fsdetails->mnt_dir); else ret = snprintf(buf, sizeof(buf), "Disk shortage ahead: %d%% is used (%s) on partition containing the file %s", disk, msg, path);