Accepting request 700059 from hardware
- Fix displaying proper logical name of network device bsc#1133923 * lswh-logical-name-iface.patch - Fix displaying correct version bsc##1130818 * lshw-display-latest-version.patch * lshw-help-man.patch * lshw-modified-time.patch OBS-URL: https://build.opensuse.org/request/show/700059 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lshw?expand=0&rev=9
This commit is contained in:
commit
ac7647980c
29
lshw-display-latest-version.patch
Normal file
29
lshw-display-latest-version.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 5e58d66598908249f44d349d22efdc4524f0cfcb Mon Sep 17 00:00:00 2001
|
||||
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
Date: Mon, 29 Apr 2019 22:39:08 +0530
|
||||
Subject: [PATCH] Fix version output
|
||||
|
||||
Display latest version only when its greater than current version.
|
||||
|
||||
"lshw -version" tries to get current version from upstream repository.
|
||||
If it contains old version then output becomes confusing (as running
|
||||
version > latest version).
|
||||
|
||||
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
---
|
||||
src/lshw.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lshw.cc b/src/lshw.cc
|
||||
index 219a008..be233eb 100644
|
||||
--- a/src/lshw.cc
|
||||
+++ b/src/lshw.cc
|
||||
@@ -121,7 +121,7 @@ char **argv)
|
||||
printf("%s\n", getpackageversion());
|
||||
if(latest)
|
||||
{
|
||||
- if(strcmp(latest, getpackageversion()) != 0)
|
||||
+ if(strcmp(latest, getpackageversion()) >= 0)
|
||||
fprintf(stderr, _("the latest version is %s\n"), latest);
|
||||
}
|
||||
exit(0);
|
43
lshw-help-man.patch
Normal file
43
lshw-help-man.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 33951733bb800321780444a178b969c212c65875 Mon Sep 17 00:00:00 2001
|
||||
From: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
|
||||
Date: Wed, 12 Jul 2017 11:00:43 +0530
|
||||
Subject: [PATCH] Update help message and man page
|
||||
|
||||
lshw -dump option displays output on stdout as well as stores SQLite
|
||||
format data into a file. Lets update man page and help message to
|
||||
reflect this.
|
||||
|
||||
Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
|
||||
[Updated description - Vasant]
|
||||
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
---
|
||||
src/lshw.1 | 2 +-
|
||||
src/lshw.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lshw.1 b/src/lshw.1
|
||||
index 43239da..79c3619 100644
|
||||
--- a/src/lshw.1
|
||||
+++ b/src/lshw.1
|
||||
@@ -53,7 +53,7 @@ Outputs the device tree showing hardware paths, very much like the output of HP-
|
||||
Outputs the device list showing bus information, detailing SCSI, USB, IDE and PCI addresses.
|
||||
.TP
|
||||
\fB-dump \fIfilename\fB\fR
|
||||
-Dump collected information into a file (SQLite database).
|
||||
+Display output and dump collected information into a file (SQLite database).
|
||||
.TP
|
||||
\fB-class \fIclass\fB\fR
|
||||
Only show the given class of hardware. \fIclass\fR can be found using \fBlshw -short\fR or \fBlshw -businfo\fR\&.
|
||||
diff --git a/src/lshw.cc b/src/lshw.cc
|
||||
index 5fc8ade..219a008 100644
|
||||
--- a/src/lshw.cc
|
||||
+++ b/src/lshw.cc
|
||||
@@ -35,7 +35,7 @@ void usage(const char *progname)
|
||||
fprintf(stderr, _("\t-X use graphical interface\n"));
|
||||
fprintf(stderr, _("\noptions can be\n"));
|
||||
#ifdef SQLITE
|
||||
- fprintf(stderr, _("\t-dump OUTFILE save hardware tree to a file\n"));
|
||||
+ fprintf(stderr, _("\t-dump filename displays output and dump collected information into a file (SQLite database)\n"));
|
||||
#endif
|
||||
fprintf(stderr, _("\t-class CLASS only show a certain class of hardware\n"));
|
||||
fprintf(stderr, _("\t-C CLASS same as '-class CLASS'\n"));
|
39
lshw-modified-time.patch
Normal file
39
lshw-modified-time.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From d76f5c6bcb68ef1c5fabd84df9f6025ea1053b90 Mon Sep 17 00:00:00 2001
|
||||
From: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
|
||||
Date: Thu, 13 Jul 2017 14:18:08 +0530
|
||||
Subject: [PATCH] Do not show modified time with -notime option
|
||||
|
||||
Exclude volatile attributes (timestamps) from lshw -notime output.
|
||||
|
||||
Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
|
||||
[Updated description and fixed detect_hfsx() - Vasant]
|
||||
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
---
|
||||
src/core/volumes.cc | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
|
||||
index 07a253b..456809a 100644
|
||||
--- a/src/core/volumes.cc
|
||||
+++ b/src/core/volumes.cc
|
||||
@@ -651,8 +651,10 @@ static bool detect_hfsx(hwNode & n, source & s)
|
||||
wtime = (time_t)(be_long(&vol->modifyDate) - HFSTIMEOFFSET);
|
||||
n.setConfig("created", datetime(mkfstime, false)); // creation time uses local time
|
||||
if (enabled("output:time"))
|
||||
+ {
|
||||
n.setConfig("checked", datetime(fscktime));
|
||||
- n.setConfig("modified", datetime(wtime));
|
||||
+ n.setConfig("modified", datetime(wtime));
|
||||
+ }
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -742,7 +744,7 @@ static bool detect_hfs(hwNode & n, source & s)
|
||||
n.setConfig("created", datetime(mkfstime - HFSTIMEOFFSET, false)); // all dates use local time
|
||||
if(dumptime)
|
||||
n.setConfig("backup", datetime(dumptime - HFSTIMEOFFSET, false));
|
||||
- if(wtime)
|
||||
+ if(wtime && enabled("output:time"))
|
||||
n.setConfig("modified", datetime(wtime - HFSTIMEOFFSET, false));
|
||||
|
||||
return true;
|
10
lshw.changes
10
lshw.changes
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 2 09:56:21 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
|
||||
|
||||
- Fix displaying proper logical name of network device bsc#1133923
|
||||
* lswh-logical-name-iface.patch
|
||||
- Fix displaying correct version bsc##1130818
|
||||
* lshw-display-latest-version.patch
|
||||
* lshw-help-man.patch
|
||||
* lshw-modified-time.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 28 09:34:43 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
|
||||
|
||||
|
10
lshw.spec
10
lshw.spec
@ -27,6 +27,12 @@ URL: https://www.ezix.org/project/wiki/HardwareLiSter
|
||||
Source: lshw-%{version}.tar.xz
|
||||
Source1: lshw.desktop.in
|
||||
Source2: lshw.png
|
||||
# PATCH-FIX-UPSTREAM lswh-logical-name-iface.patch bsc#1133923
|
||||
Patch0: lswh-logical-name-iface.patch
|
||||
# PATCH-FIX-UPSTREAM lshw-display-latest-version.patch lshw-help-man.patch lshw-modified-time.patch bsc##1130818
|
||||
Patch1: lshw-display-latest-version.patch
|
||||
Patch2: lshw-help-man.patch
|
||||
Patch3: lshw-modified-time.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libpng-devel
|
||||
@ -76,6 +82,10 @@ http://www.ezix.org/software/lshw.html
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
make \
|
||||
|
46
lswh-logical-name-iface.patch
Normal file
46
lswh-logical-name-iface.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 85edb6a1a5734078a58bad21a5e6918e07f360bc Mon Sep 17 00:00:00 2001
|
||||
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
|
||||
Date: Tue, 30 Apr 2019 17:24:50 +0530
|
||||
Subject: [PATCH] Display proper logical name of network device
|
||||
|
||||
This patch adds support to display proper logical name of
|
||||
network devices.
|
||||
|
||||
Test results:
|
||||
|
||||
*-l-lan
|
||||
description: Ethernet interface
|
||||
physical id: 2
|
||||
bus info: vio@30000002
|
||||
logical name: /proc/device-tree/vdevice/l-lan@30000002
|
||||
|
||||
With patch:
|
||||
|
||||
*-l-lan
|
||||
description: Ethernet interface
|
||||
physical id: 2
|
||||
bus info: vio@30000002
|
||||
logical name: /proc/device-tree/vdevice/l-lan@30000002
|
||||
logical name: eth0
|
||||
|
||||
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
|
||||
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
---
|
||||
src/core/hw.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/hw.cc b/src/core/hw.cc
|
||||
index f136383..4522c1a 100644
|
||||
--- a/src/core/hw.cc
|
||||
+++ b/src/core/hw.cc
|
||||
@@ -1284,8 +1284,8 @@ void hwNode::merge(const hwNode & node)
|
||||
This->handle = node.getHandle();
|
||||
if (This->description == "")
|
||||
This->description = node.getDescription();
|
||||
- if (This->logicalnames.size() == 0)
|
||||
- This->logicalnames = node.getLogicalNames();
|
||||
+ for (unsigned int i = 0; i < node.This->logicalnames.size(); i++)
|
||||
+ setLogicalName(node.This->logicalnames[i]);
|
||||
if (This->businfo == "")
|
||||
This->businfo = node.getBusInfo();
|
||||
if (This->physid == "")
|
Loading…
Reference in New Issue
Block a user