rpms/apcupsd/devel apcupsd-3.14.1-linux-usb.patch, NONE, 1.1 apcupsd.spec, 1.18, 1.19
Orion Poplawski (orion)
fedora-extras-commits at redhat.com
Mon Jul 2 15:21:14 UTC 2007
Author: orion
Update of /cvs/pkgs/rpms/apcupsd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21464
Modified Files:
apcupsd.spec
Added Files:
apcupsd-3.14.1-linux-usb.patch
Log Message:
Add patch for linux USB UPS detection (bug #245864)
apcupsd-3.14.1-linux-usb.patch:
--- NEW FILE apcupsd-3.14.1-linux-usb.patch ---
--- apcupsd-3.14.1/src/drivers/usb/linux/linux-usb.c.linux-usb 2007/05/02 00:26:52 1.26.6.1
+++ apcupsd-3.14.1/src/drivers/usb/linux/linux-usb.c 2007/06/29 22:18:41 1.26.6.2
@@ -114,20 +114,17 @@
if (fd >= 0) {
/* Check for the UPS application HID usage */
for (i = 0; (ret = ioctl(fd, HIDIOCAPPLICATION, i)) > 0; i++) {
- if ((ret & 0xffff000) == (UPS_USAGE & 0xffff0000))
- break;
- }
- /* If we found the UPS application usage, we're good to go */
- if (ret) {
- /* Request full uref reporting from read() */
- if (FORCE_COMPAT24 || ioctl(fd, HIDIOCSFLAG, &flaguref)) {
- Dmsg0(100, "HIDIOCSFLAG failed; enabling linux-2.4 "
- "compatibility mode\n");
- my_data->compat24 = true;
+ if ((ret & 0xffff000) == (UPS_USAGE & 0xffff0000)) {
+ /* Request full uref reporting from read() */
+ if (FORCE_COMPAT24 || ioctl(fd, HIDIOCSFLAG, &flaguref)) {
+ Dmsg0(100, "HIDIOCSFLAG failed; enabling linux-2.4 "
+ "compatibility mode\n");
+ my_data->compat24 = true;
+ }
+ /* Successfully opened the device */
+ Dmsg1(200, "Successfully opened \"%s\"\n", dev);
+ return fd;
}
- /* Successfully opened the device */
- Dmsg1(200, "Successfully opened \"%s\"\n", dev);
- return fd;
}
close(fd);
}
Index: apcupsd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/apcupsd/devel/apcupsd.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apcupsd.spec 4 Jun 2007 22:55:10 -0000 1.18
+++ apcupsd.spec 2 Jul 2007 15:20:26 -0000 1.19
@@ -1,6 +1,6 @@
Name: apcupsd
Version: 3.14.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: APC UPS Power Control Daemon for Linux
Group: System Environment/Daemons
@@ -10,6 +10,7 @@
Source1: apcupsd.logrotate
Source2: apcupsd-httpd.conf
Patch0: apcupsd-3.14.0-init.patch
+Patch1: apcupsd-3.14.1-linux-usb.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0
@@ -53,6 +54,7 @@
%prep
%setup -q
%patch -p1 -b .init
+%patch1 -p1 -b .linux-usb
# Don't strip binaries
sed -i -e 's/^\(.*INSTALL_PROGRAM.*\) -s /\1 /' src{,/cgi}/Makefile.in
@@ -167,6 +169,9 @@
%changelog
+* Mon Jun 02 2007 - Orion Poplawski <orion at cora.nwra.com> - 3.14.1-2
+- Add patch for linux USB UPS detection (bug #245864)
+
* Tue May 29 2007 - Orion Poplawski <orion at cora.nwra.com> - 3.14.1-1
- Update to 3.14.1
More information about the scm-commits
mailing list