aboutsummaryrefslogtreecommitdiff
path: root/networking/ntpd.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-27 02:35:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-27 02:35:15 +0100
commit160b9ca7318fb63e9432c1028f52373aea6166f9 (patch)
tree9332d87a07380d9df65858e4d3779b5130ed02f3 /networking/ntpd.c
parent1361aa2e2d80cb144b4158722de3c913855e6002 (diff)
downloadbusybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.tar.gz
busybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.tar.bz2
busybox-w32-160b9ca7318fb63e9432c1028f52373aea6166f9.zip
ntpd: make it NOMMU-safe; ash: exclude it on NOMMU builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r--networking/ntpd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 156cad6cf..c374120e2 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -892,6 +892,14 @@ static NOINLINE void ntp_init(char **argv)
892 &peers, &G.verbose); 892 &peers, &G.verbose);
893 if (!(opts & (OPT_p|OPT_l))) 893 if (!(opts & (OPT_p|OPT_l)))
894 bb_show_usage(); 894 bb_show_usage();
895 if (opts & OPT_g)
896 G.settime = 1;
897 while (peers)
898 add_peers(llist_pop(&peers));
899 if (!(opts & OPT_n)) {
900 bb_daemonize_or_rexec(DAEMON_DEVNULL_STDIO, argv);
901 logmode = LOGMODE_NONE;
902 }
895#if ENABLE_FEATURE_NTPD_SERVER 903#if ENABLE_FEATURE_NTPD_SERVER
896 G.listen_fd = -1; 904 G.listen_fd = -1;
897 if (opts & OPT_l) { 905 if (opts & OPT_l) {
@@ -900,14 +908,6 @@ static NOINLINE void ntp_init(char **argv)
900 setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY)); 908 setsockopt(G.listen_fd, IPPROTO_IP, IP_TOS, &const_IPTOS_LOWDELAY, sizeof(const_IPTOS_LOWDELAY));
901 } 909 }
902#endif 910#endif
903 if (opts & OPT_g)
904 G.settime = 1;
905 while (peers)
906 add_peers(llist_pop(&peers));
907 if (!(opts & OPT_n)) {
908 logmode = LOGMODE_NONE;
909 bb_daemonize(DAEMON_DEVNULL_STDIO);
910 }
911 /* I hesitate to set -20 prio. -15 should be high enough for timekeeping */ 911 /* I hesitate to set -20 prio. -15 should be high enough for timekeeping */
912 if (opts & OPT_N) 912 if (opts & OPT_N)
913 setpriority(PRIO_PROCESS, 0, -15); 913 setpriority(PRIO_PROCESS, 0, -15);