summaryrefslogtreecommitdiff
path: root/sysutils/ups-nut/patches/patch-ac
blob: 96687a5c9ae0aabd3d216006d3fa3a3857bbadf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ac,v 1.4.4.2 2002/08/25 21:21:32 jlam Exp $

--- clients/upslog.c.orig	Fri May 17 08:26:22 2002
+++ clients/upslog.c
@@ -180,6 +180,13 @@ void print_status(void)
 			continue;
 		}
 
+		/* if a %%, append % and start over */
+		if (logformat[i+1] == '%') {
+			snprintfcat(logbuffer, sizeof(logbuffer), "%%");
+			i++;
+			continue;
+		}
+
 		/* it must start with a % now - %<cmd>[ <arg>]%*/
 
 		cmd = xstrdup(&logformat[i+1]);