cfe9690692
* lshw-display-latest-version.patch * lshw-help-man.patch * lshw-modified-time.patch OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=27
40 lines
1.5 KiB
Diff
40 lines
1.5 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(-)
|
|
|
|
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;
|