aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rtc_.h6
-rw-r--r--include/usage.src.h6
-rw-r--r--libbb/rtc.c6
-rw-r--r--util-linux/hwclock.c5
-rw-r--r--util-linux/rtcwake.c5
5 files changed, 12 insertions, 16 deletions
diff --git a/include/rtc_.h b/include/rtc_.h
index 750fc20ec..24ff5363f 100644
--- a/include/rtc_.h
+++ b/include/rtc_.h
@@ -11,6 +11,12 @@
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
+#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
+# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
+#else
+# define ADJTIME_PATH "/etc/adjtime"
+#endif
+
int rtc_adjtime_is_utc(void) FAST_FUNC;
int rtc_xopen(const char **default_rtc, int flags) FAST_FUNC;
void rtc_read_tm(struct tm *ptm, int fd) FAST_FUNC;
diff --git a/include/usage.src.h b/include/usage.src.h
index d22efd3ba..1ac252d1b 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -25,6 +25,12 @@
" (default "CONFIG_FEATURE_DEFAULT_PASSWD_ALGO")"
#endif
+#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
+# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
+#else
+# define ADJTIME_PATH "/etc/adjtime"
+#endif
+
INSERT
#define busybox_notes_usage \
diff --git a/libbb/rtc.c b/libbb/rtc.c
index c4117ba34..54b52f23a 100644
--- a/libbb/rtc.c
+++ b/libbb/rtc.c
@@ -7,12 +7,6 @@
#include "libbb.h"
#include "rtc_.h"
-#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
-# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
-#else
-# define ADJTIME_PATH "/etc/adjtime"
-#endif
-
int FAST_FUNC rtc_adjtime_is_utc(void)
{
int utc = 0;
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index dd66ec199..25db7cdad 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -344,11 +344,6 @@ static void from_sys_clock(const char **pp_rtcname, int utc)
// --test dry run; implies --verbose
// -v, --verbose display more details
-//usage:#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
-//usage:# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
-//usage:#else
-//usage:# define ADJTIME_PATH "/etc/adjtime"
-//usage:#endif
//usage:#define hwclock_trivial_usage
//usage: IF_LONG_OPTS(
//usage: "[-swul] [--systz] [-f DEV]"
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index be7e95099..eac16077d 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -32,11 +32,6 @@
//kbuild:lib-$(CONFIG_RTCWAKE) += rtcwake.o
-//usage:#if ENABLE_FEATURE_HWCLOCK_ADJTIME_FHS
-//usage:# define ADJTIME_PATH "/var/lib/hwclock/adjtime"
-//usage:#else
-//usage:# define ADJTIME_PATH "/etc/adjtime"
-//usage:#endif
//usage:#define rtcwake_trivial_usage
//usage: "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
//usage:#define rtcwake_full_usage "\n\n"