lshw/lshw-modified-time.patch
Martin Pluskal 491fd965c0 - Update to version B.02.18+git.20190613 (fate#326432 jsc#SLE-7715):
* devtree: Add DIMM running speed
  * spd: Print dimm rank information
  * Display proper logical name of network device
- Drop no longer needed lswh-logical-name-iface.patc

OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=29
2019-10-24 14:52:40 +00:00

40 lines
1.6 KiB
Diff

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(-)
Index: lshw-B.02.18+git.20190613/src/core/volumes.cc
===================================================================
--- lshw-B.02.18+git.20190613.orig/src/core/volumes.cc
+++ lshw-B.02.18+git.20190613/src/core/volumes.cc
@@ -651,8 +651,10 @@ static bool detect_hfsx(hwNode & n, sour
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, sourc
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;