summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-10-27 16:23:32 +0200
committerKay Sievers <kay@vrfy.org>2012-10-27 16:31:10 +0200
commit19e65613563dd9c14cf1ce58aa6e151de8fb90c2 (patch)
treee4ee82809a4dbb218d041a5966e46ad872b0715d /src/shared
parentb80f194eea3e2757966118cadf218354b11bf5da (diff)
hwclock: do not seal the kernel's time-warp call from inside the initrd
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/hwclock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/hwclock.c b/src/shared/hwclock.c
index 0e8fa45971..f9adf0369e 100644
--- a/src/shared/hwclock.c
+++ b/src/shared/hwclock.c
@@ -199,14 +199,14 @@ int hwclock_set_timezone(int *min) {
const struct timeval *tv_null = NULL;
struct timespec ts;
struct tm *tm;
- int minuteswest;
+ int minutesdelta;
struct timezone tz;
assert_se(clock_gettime(CLOCK_REALTIME, &ts) == 0);
assert_se(tm = localtime(&ts.tv_sec));
- minuteswest = tm->tm_gmtoff / 60;
+ minutesdelta = tm->tm_gmtoff / 60;
- tz.tz_minuteswest = -minuteswest;
+ tz.tz_minuteswest = -minutesdelta;
tz.tz_dsttime = 0; /* DST_NONE*/
/*
@@ -217,7 +217,7 @@ int hwclock_set_timezone(int *min) {
if (settimeofday(tv_null, &tz) < 0)
return -errno;
if (min)
- *min = minuteswest;
+ *min = minutesdelta;
return 0;
}