lshw/lshw-display-latest-version.patch
Martin Pluskal c49810b6b3 - Update to version B.02.18+git.20191228:
* fix #755: handle invalid FAT
  * code clean-up
  * volumes: Add support for detecting Apple APFS fstype
  * partitions: Add Apple APFS GUID
  * specfile: Fix version issue
  * Do not show modified time with -notime option
  * Update help message and man page
- Drop upstreamed patches:
  * lshw-help-man.patch
  * lshw-modified-time.patch
- Add lshw-nvme.patch to support nvme devices bsc#1161323

OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=38
2020-03-16 12:20:03 +00:00

30 lines
1.0 KiB
Diff

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(-)
Index: lshw-B.02.18+git.20191228/src/lshw.cc
===================================================================
--- lshw-B.02.18+git.20191228.orig/src/lshw.cc
+++ lshw-B.02.18+git.20191228/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);