From a550549894ec21faf820fe77a1e5059109a70682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Terje=20R=F8sten?= Date: Sun, 5 Sep 2010 16:06:33 +0200 Subject: [PATCH] - Add patch to fix ext4 issue. --- lshw-ext4.patch | 23 +++++++++++++++++++++++ lshw.spec | 11 ++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 lshw-ext4.patch diff --git a/lshw-ext4.patch b/lshw-ext4.patch new file mode 100644 index 0000000..4ffd832 --- /dev/null +++ b/lshw-ext4.patch @@ -0,0 +1,23 @@ +Index: src/core/hw.cc +=================================================================== +--- src/core/hw.cc (revision 2143) ++++ src/core/hw.cc (revision 2144) +@@ -47,13 +47,17 @@ + string hw::strip(const string & s) + { + string result = s; ++ size_t i = result.find('\0'); + ++ if(i != string::npos) ++ result = result.substr(0, i); ++ + while ((result.length() > 0) && ((uint8_t)result[0] <= ' ')) + result.erase(0, 1); + while ((result.length() > 0) && ((uint8_t)result[result.length() - 1] <= ' ')) + result.erase(result.length() - 1); + +- for (unsigned int i = 0; i < result.length(); i++) ++ for (i = 0; i < result.length(); i++) + if ((uint8_t)result[i] < ' ') + { + result.erase(i, 1); diff --git a/lshw.spec b/lshw.spec index 984acff..6f1ea0b 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,7 +1,7 @@ Summary: Hardware lister Name: lshw Version: B.02.14 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: Applications/System URL: http://ezix.org/project/wiki/HardwareLiSter @@ -9,6 +9,7 @@ Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz Source1: lshw.desktop Source2: lshw.consolehelper Source3: lshw.pam +Patch0: lshw-ext4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: hwdata @@ -38,6 +39,7 @@ plain, XML or HTML format. %prep %setup -q -n %{name}-%{version} +%patch0 -p0 %{__sed} -i 's|-g -Wall -g|%{optflags}|' src/Makefile %{__sed} -i 's|-g -Wall -Os|%{optflags}|' src/core/Makefile @@ -114,13 +116,16 @@ desktop-file-install --vendor fedora \ %{_datadir}/applications/fedora-%{name}.desktop %changelog +* Sun Sep 05 2010 Terje Rosten - B.02.14-4 +- Add patch to fix ext4 issue. + * Sat Jul 25 2009 Fedora Release Engineering - B.02.14-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -* Wed May 06 2009 Adam Jackson B.02.14-2 +* Wed May 06 2009 Adam Jackson - B.02.14-2 - Requires: hwdata - Drop redundant copies of pci.ids and friends, since we'll pick up the - copies in hwdata at runtime. + copies in hwdata at runtime * Sun Mar 1 2009 Terje Rosten - B.02.14-1 - B.02.14