From c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Jan 2021 20:43:27 +0100 Subject: New upstream version 3.0.5 --- linux/SystemdMeter.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'linux/SystemdMeter.c') diff --git a/linux/SystemdMeter.c b/linux/SystemdMeter.c index 4350d26..61bb59b 100644 --- a/linux/SystemdMeter.c +++ b/linux/SystemdMeter.c @@ -267,9 +267,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out char buffer[16]; int color = (systemState && 0 == strcmp(systemState, "running")) ? METER_VALUE_OK : METER_VALUE_ERROR; - RichString_write(out, CRT_colors[color], systemState ? systemState : "???"); + RichString_writeAscii(out, CRT_colors[color], systemState ? systemState : "N/A"); - RichString_append(out, CRT_colors[METER_TEXT], " ("); + RichString_appendAscii(out, CRT_colors[METER_TEXT], " ("); if (nFailedUnits == INVALID_VALUE) { buffer[0] = '?'; @@ -277,9 +277,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out } else { xSnprintf(buffer, sizeof(buffer), "%u", nFailedUnits); } - RichString_append(out, zeroDigitColor(nFailedUnits), buffer); + RichString_appendAscii(out, zeroDigitColor(nFailedUnits), buffer); - RichString_append(out, CRT_colors[METER_TEXT], "/"); + RichString_appendAscii(out, CRT_colors[METER_TEXT], "/"); if (nNames == INVALID_VALUE) { buffer[0] = '?'; @@ -287,9 +287,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out } else { xSnprintf(buffer, sizeof(buffer), "%u", nNames); } - RichString_append(out, valueDigitColor(nNames), buffer); + RichString_appendAscii(out, valueDigitColor(nNames), buffer); - RichString_append(out, CRT_colors[METER_TEXT], " failed) ("); + RichString_appendAscii(out, CRT_colors[METER_TEXT], " failed) ("); if (nJobs == INVALID_VALUE) { buffer[0] = '?'; @@ -297,9 +297,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out } else { xSnprintf(buffer, sizeof(buffer), "%u", nJobs); } - RichString_append(out, zeroDigitColor(nJobs), buffer); + RichString_appendAscii(out, zeroDigitColor(nJobs), buffer); - RichString_append(out, CRT_colors[METER_TEXT], "/"); + RichString_appendAscii(out, CRT_colors[METER_TEXT], "/"); if (nInstalledJobs == INVALID_VALUE) { buffer[0] = '?'; @@ -307,9 +307,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out } else { xSnprintf(buffer, sizeof(buffer), "%u", nInstalledJobs); } - RichString_append(out, valueDigitColor(nInstalledJobs), buffer); + RichString_appendAscii(out, valueDigitColor(nInstalledJobs), buffer); - RichString_append(out, CRT_colors[METER_TEXT], " jobs)"); + RichString_appendAscii(out, CRT_colors[METER_TEXT], " jobs)"); } static const int SystemdMeter_attributes[] = { -- cgit v1.2.3