Skip to content

Commit 92b73d7

Browse files
committed
clients/upsmon.c: clarifications and beautifications for legacy alarms [networkupstools#2931]
Signed-off-by: desertwitch <[email protected]>
1 parent fdd9b4e commit 92b73d7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clients/upsmon.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,8 @@ static void ups_is_alarm(utype_t *ups)
820820
do_notify(ups, NOTIFY_ALARM, alarms);
821821
}
822822
} else {
823-
upsdebugx(4, "%s: %s: still on alarm, failed to get current ups.alarm value",
823+
upsdebugx(4, "%s: %s: still on alarm, failed to get current ups.alarm value, "
824+
"perhaps it is just a legacy driver (but we keep probing it to be safe)",
824825
__func__, ups->sys);
825826
}
826827
return;
@@ -842,9 +843,10 @@ static void ups_is_alarm(utype_t *ups)
842843
__func__, ups->sys, alarms);
843844
do_notify(ups, NOTIFY_ALARM, alarms);
844845
} else {
845-
upsdebugx(4, "%s: %s: failed to get current ups.alarm value",
846+
upsdebugx(4, "%s: %s: failed to get current ups.alarm value, perhaps "
847+
"it is just a legacy driver (but we keep probing it to be safe)",
846848
__func__, ups->sys);
847-
do_notify(ups, NOTIFY_ALARM, NULL);
849+
do_notify(ups, NOTIFY_ALARM, "n/a");
848850
alarms[0] = '\0';
849851
}
850852
strncpy(alarms_prev, alarms, sizeof(alarms_prev));

0 commit comments

Comments
 (0)