- add patch to fix bz #442501
This commit is contained in:
parent
5dabbe962c
commit
e0a7ecf7e1
32
lshw-B.02.12.01-config-cap.patch
Normal file
32
lshw-B.02.12.01-config-cap.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Index: src/core/pci.cc
|
||||||
|
===================================================================
|
||||||
|
--- src/core/pci.cc (revisjon 1933)
|
||||||
|
+++ src/core/pci.cc (revisjon 1934)
|
||||||
|
@@ -70,6 +70,7 @@
|
||||||
|
#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */
|
||||||
|
#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */
|
||||||
|
#define PCI_CAP_SIZEOF 4
|
||||||
|
+#define PCI_FIND_CAP_TTL 48
|
||||||
|
|
||||||
|
#define PCI_SID_ESR 2 /* Expansion Slot Register */
|
||||||
|
#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */
|
||||||
|
@@ -668,8 +669,9 @@
|
||||||
|
{
|
||||||
|
unsigned int where = get_conf_byte(d, PCI_CAPABILITY_LIST) & ~3;
|
||||||
|
string buffer;
|
||||||
|
+ unsigned int ttl = PCI_FIND_CAP_TTL;
|
||||||
|
|
||||||
|
- while(where)
|
||||||
|
+ while(where && ttl--)
|
||||||
|
{
|
||||||
|
unsigned int id, next, cap;
|
||||||
|
|
||||||
|
@@ -677,7 +679,7 @@
|
||||||
|
next = get_conf_byte(d, where + PCI_CAP_LIST_NEXT) & ~3;
|
||||||
|
cap = get_conf_word(d, where + PCI_CAP_FLAGS);
|
||||||
|
|
||||||
|
- if(!id)
|
||||||
|
+ if(!id || id == 0xff)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch(id)
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Hardware lister
|
Summary: Hardware lister
|
||||||
Name: lshw
|
Name: lshw
|
||||||
Version: B.02.12.01
|
Version: B.02.12.01
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://ezix.org/project/wiki/HardwareLiSter
|
URL: http://ezix.org/project/wiki/HardwareLiSter
|
||||||
@ -10,6 +10,7 @@ Source1: lshw.desktop
|
|||||||
Source2: lshw.consolehelper
|
Source2: lshw.consolehelper
|
||||||
Source3: lshw.pam
|
Source3: lshw.pam
|
||||||
Patch0: lshw-B.02.12.01-gcc43.patch
|
Patch0: lshw-B.02.12.01-gcc43.patch
|
||||||
|
Patch1: lshw-B.02.12.01-config-cap.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -37,6 +38,7 @@ plain, XML or HTML format.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch -p1
|
%patch -p1
|
||||||
|
%patch1 -p0
|
||||||
|
|
||||||
%{__sed} -i 's|-g -Wall -g|%{optflags}|' src/Makefile
|
%{__sed} -i 's|-g -Wall -g|%{optflags}|' src/Makefile
|
||||||
%{__sed} -i 's|-g -Wall -Os|%{optflags}|' src/core/Makefile
|
%{__sed} -i 's|-g -Wall -Os|%{optflags}|' src/core/Makefile
|
||||||
@ -108,6 +110,9 @@ desktop-file-install --vendor fedora \
|
|||||||
%{_datadir}/applications/fedora-%{name}.desktop
|
%{_datadir}/applications/fedora-%{name}.desktop
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 15 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-4
|
||||||
|
- add patch to fix bz #442501
|
||||||
|
|
||||||
* Mon Feb 11 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-3
|
* Mon Feb 11 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-3
|
||||||
- add patch to build with gcc-4.3
|
- add patch to build with gcc-4.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user