From d76f5c6bcb68ef1c5fabd84df9f6025ea1053b90 Mon Sep 17 00:00:00 2001 From: Seeteena Thoufeek 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 [Updated description and fixed detect_hfsx() - Vasant] Signed-off-by: Vasant Hegde --- 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;