util-linux/util-linux-ng-2.12q-adjtime_path.patch

51 lines
2.3 KiB
Diff

diff -pur util-linux-2.12q/hwclock/hwclock.c util-linux-2.12q-fix/hwclock/hwclock.c
--- util-linux-2.12q/hwclock/hwclock.c 2004-12-15 20:13:48.000000000 +0100
+++ util-linux-2.12q-fix/hwclock/hwclock.c 2005-09-20 10:27:49.000000000 +0200
@@ -45,7 +45,7 @@
* reading '/etc/clock -au' instead of '/etc/clock -u -s', this error
* is automatically corrected at every boot.
*
- * To do this job, the program reads and writes the file '/etc/adjtime'
+ * To do this job, the program reads and writes the file '/var/lib/hwclock/adjtime'
* to determine the correction, and to save its data. In this file are
* three numbers:
*
@@ -58,13 +58,13 @@
*
* Installation and use of this program:
*
- * a) create a file '/etc/adjtime' containing as the first and only line:
+ * a) create a file '/var/lib/hwclock/adjtime' containing as the first and only line:
* '0.0 0 0.0'
* b) run 'clock -au' or 'clock -a', depending on whether your cmos is in
* universal or local time. This updates the second number.
* c) set your system time using the 'date' command.
* d) update your cmos time using 'clock -wu' or 'clock -w'
- * e) replace the first number in /etc/adjtime by your correction.
+ * e) replace the first number in /var/lib/hwclock/adjtime by your correction.
* f) put the command 'clock -au' or 'clock -a' in your '/etc/rc.local'
*/
@@ -96,7 +96,7 @@ struct clock_ops *ur;
#define FLOOR(arg) ((arg >= 0 ? (int) arg : ((int) arg) - 1));
/* Here the information for time adjustments is kept. */
-#define ADJPATH "/etc/adjtime"
+#define ADJPATH "/var/lib/hwclock/adjtime"
/* Store the date here when "badyear" flag is set. */
#define LASTDATE "/var/lib/lastdate"
@@ -231,10 +231,10 @@ hw_clock_is_utc(const bool utc, const bo
static int
read_adjtime(struct adjtime *adjtime_p) {
/*----------------------------------------------------------------------------
- Read the adjustment parameters out of the /etc/adjtime file.
+ Read the adjustment parameters out of the /var/lib/hwclock/adjtime file.
Return them as the adjtime structure <*adjtime_p>.
- If there is no /etc/adjtime file, return defaults.
+ If there is no /var/lib/hwclock/adjtime file, return defaults.
If values are missing from the file, return defaults for them.
return value 0 if all OK, !=0 otherwise.