From 1f7bd4a59288f2b8e34b6ad8f6e67d1f706fc1b0 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 7 May 2020 11:34:46 +0100 Subject: [PATCH] Prefix disk name on size labels labels for CPU frequency are "CPU 1 Clock Frequency". Network speeds have the interface name at front. Partitions didn't match, leaving the key in the graph to be just "Available" several times if you plotted multiple disks. This adds a prefix so it's consistent. --- ksysguardd/Linux/diskstat.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ksysguardd/Linux/diskstat.c b/ksysguardd/Linux/diskstat.c index 3b849aaa..2eeee07f 100644 --- a/ksysguardd/Linux/diskstat.c +++ b/ksysguardd/Linux/diskstat.c @@ -321,7 +321,7 @@ void printDiskStatUsedInfo( const char* cmd ) { char *mntpnt = getMntPnt( cmd ); - output( "Used\t0\t%ld\tKB\n", getTotal( mntpnt ) ); + output( "%s Used\t0\t%ld\tKB\n", mntpnt, getTotal( mntpnt ) ); } void printDiskStatFree( const char* cmd ) @@ -354,7 +354,7 @@ void printDiskStatFreeInfo( const char* cmd ) { char *mntpnt = (char*)getMntPnt( cmd ); - output( "Available\t0\t%ld\tKB\n", getTotal( mntpnt ) ); + output( "%s Available\t0\t%ld\tKB\n", mntpnt, getTotal( mntpnt ) ); } void printDiskStatPercent( const char* cmd ) @@ -391,19 +391,18 @@ void printDiskStatPercent( const char* cmd ) void printDiskStatPercentInfo( const char* cmd ) { - (void)cmd; - output( "Percentage Used\t0\t100\t%%\n" ); + char *mntpnt = (char*)getMntPnt( cmd ); + output( "%s Percentage Used\t0\t100\t%%\n", mntpnt ); } void printDiskStatTotal( const char* cmd ) { char *mntpnt = (char*)getMntPnt( cmd ); - - output( "%ld\n\n", getTotal( mntpnt ) ); + output( "%s, %ld\n\n", mntpnt, getTotal( mntpnt ) ); } void printDiskStatTotalInfo( const char* cmd ) { - (void)cmd; - output( "Total Size\t0\t0\tKB\n" ); + char *mntpnt = (char*)getMntPnt( cmd ); + output( "%s Total Size\t0\t0\tKB\n", mntpnt); } -- 2.26.0