[Nut-upsdev] blazer_usb: compatibility with Ippon BackPro UPSes (Phoenix Power Co., Ltd usb-to-serial controller)
Arjen de Korte
nut+devel at de-korte.org
Tue Jan 12 14:31:34 UTC 2010
Citeren Alexey Loukianov <mooroon2 op mail.ru>:
> Here is diff that fixes error and makes ippon subdriver to work normally on
> RHEL4 (and Fedora8 also, tested on my home PC):
>
> [allukjanov op server drivers]$ svn diff blazer_usb.c
> Index: blazer_usb.c
> ===================================================================
> - --- blazer_usb.c (revision 2240)
> +++ blazer_usb.c (working copy)
> @@ -202,7 +202,7 @@
> return ret;
> }
>
> - - snprintf(buf, sizeof(buf), "%.*s", ret, tmp);
> + snprintf(buf, buflen, "%.*s", ret, tmp);
>
> upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf);
> return ret;
>
> I think, this bug is pretty self-explaining.
It sure is (I rest my case). I've committed the change to the trunk. :-)
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list