aboutsummaryrefslogtreecommitdiff
path: root/util-linux/hwclock.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-28 03:21:21 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-28 03:21:21 +0000
commit747fc5d5fda30e7d4314d8abe80029f3792602d6 (patch)
treeecfb293f5feba4bcdb9a703b202ab7269ad69c8e /util-linux/hwclock.c
parent3978e5576e1675c2fac631fcba07a976405b5e4b (diff)
downloadbusybox-w32-747fc5d5fda30e7d4314d8abe80029f3792602d6.tar.gz
busybox-w32-747fc5d5fda30e7d4314d8abe80029f3792602d6.tar.bz2
busybox-w32-747fc5d5fda30e7d4314d8abe80029f3792602d6.zip
allow people to adjtime location
Diffstat (limited to 'util-linux/hwclock.c')
-rw-r--r--util-linux/hwclock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 11261f47d..45959e7a1 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -155,11 +155,15 @@ static int from_sys_clock(int utc)
155 return 0; 155 return 0;
156} 156}
157 157
158 158#ifdef CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
159# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
160#else
161# define ADJTIME_PATH "/etc/adjtime"
162#endif
159static int check_utc(void) 163static int check_utc(void)
160{ 164{
161 int utc = 0; 165 int utc = 0;
162 FILE *f = fopen ( "/var/lib/hwclock/adjtime", "r" ); 166 FILE *f = fopen ( ADJTIME_PATH, "r" );
163 167
164 if ( f ) { 168 if ( f ) {
165 char buffer [128]; 169 char buffer [128];