diff lib/lib.h @ 1688:ae981311e232 draft

Cleanup/refactoring pass on hwclock. Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(), inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(), and set_sysclock_timezone(). /etc/adjtime is short enough we don't need to bother with a break. The final "else" case in main() should always trigger because >0 in optstr says "at most zero arguments", so the || at the end is always true, so take the test off.
author Rob Landley <rob@landley.net>
date Mon, 09 Feb 2015 16:34:24 -0600
parents 4a6a53da1c53
children ef5d02d0d37f
line wrap: on
line diff
--- a/lib/lib.h	Sun Feb 08 16:38:38 2015 -0600
+++ b/lib/lib.h	Mon Feb 09 16:34:24 2015 -0600
@@ -128,6 +128,7 @@
 long xparsetime(char *arg, long units, long *fraction);
 void xpidfile(char *name);
 void xregcomp(regex_t *preg, char *rexec, int cflags);
+char *xtzset(char *new);
 
 // lib.c
 void verror_msg(char *msg, int err, va_list va);