2019-05-02 10:17:11 +00:00
|
|
|
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(-)
|
|
|
|
|
2020-03-16 12:20:03 +00:00
|
|
|
Index: lshw-B.02.18+git.20191228/src/lshw.cc
|
2019-10-24 14:52:40 +00:00
|
|
|
===================================================================
|
2020-03-16 12:20:03 +00:00
|
|
|
--- lshw-B.02.18+git.20191228.orig/src/lshw.cc
|
|
|
|
+++ lshw-B.02.18+git.20191228/src/lshw.cc
|
2019-05-02 10:17:11 +00:00
|
|
|
@@ -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);
|