diff options
Diffstat (limited to 'sysutils/ups-nut/patches/patch-af')
-rw-r--r-- | sysutils/ups-nut/patches/patch-af | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sysutils/ups-nut/patches/patch-af b/sysutils/ups-nut/patches/patch-af new file mode 100644 index 00000000000..9936162ecec --- /dev/null +++ b/sysutils/ups-nut/patches/patch-af @@ -0,0 +1,23 @@ +$NetBSD: patch-af,v 1.5 2002/12/31 22:47:06 lukem Exp $ + +--- drivers/newapc.c.orig Mon Oct 7 14:35:35 2002 ++++ drivers/newapc.c +@@ -182,11 +182,16 @@ char * convert_ups2info (struct apc_cmdt + case APC_F_CELCIUS: + case APC_F_HEX: + case APC_F_DEC: +- case APC_F_SECONDS: +- case APC_F_HOURS: + case APC_F_LEAVE: + /* All of these just pass through at present */ + ptr = upsval; ++ break; ++ case APC_F_SECONDS: ++ case APC_F_HOURS: ++ /* Parse number */ ++ tval = strtol(upsval, NULL, 10); ++ sprintf(tmp, "%d", tval); ++ ptr = tmp; + break; + case APC_F_MINUTES: + /* Convert to seconds - NUT standard time measurement */ |