lkml.org 
[lkml]   [2019]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rtc: Don't state that the RTC holds UTC in case it doesn't
Date
Some machines store local time in the Real Time Clock. The hard-coded
"UTC" string is wrong on those machines so just omit that string.
Update the log parser so it doesn't require the string "UTC".

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
drivers/rtc/hctosys.c | 2 +-
tools/power/pm-graph/bootgraph.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index ff2092a0d38c..2270eca23203 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -58,7 +58,7 @@ static int __init rtc_hctosys(void)

err = do_settimeofday64(&tv64);

- dev_info(rtc->dev.parent, "setting system clock to %ptR UTC (%lld)\n",
+ dev_info(rtc->dev.parent, "setting system clock to %ptR (%lld)\n",
&tm, (long long)tv64.tv_sec);

err_read:
diff --git a/tools/power/pm-graph/bootgraph.py b/tools/power/pm-graph/bootgraph.py
index 6dae57041537..5a045d1cb879 100755
--- a/tools/power/pm-graph/bootgraph.py
+++ b/tools/power/pm-graph/bootgraph.py
@@ -333,7 +333,7 @@ def parseKernelLog():
if(not sysvals.stamp['kernel']):
sysvals.stamp['kernel'] = sysvals.kernelVersion(msg)
continue
- m = re.match('.* setting system clock to (?P<t>.*) UTC.*', msg)
+ m = re.match('.* setting system clock to (?P<t>.*) (?:UTC )?\(.*', msg)
if(m):
bt = datetime.strptime(m.group('t'), '%Y-%m-%d %H:%M:%S')
bt = bt - timedelta(seconds=int(ktime))
--
2.21.0
\
 
 \ /
  Last update: 2019-06-21 04:03    [W:0.108 / U:0.432 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site