Very minor rdate updates
authorEric Andersen <andersen@codepoet.org>
Tue, 22 Jul 2003 08:26:05 +0000 (08:26 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 22 Jul 2003 08:26:05 +0000 (08:26 -0000)
include/applets.h
include/usage.h
util-linux/rdate.c

index 2a90b66c5bb6fc1c5bd3ab4240858a77b077edbf..d01ab2d7466946862c34743cdd90edc04c45da90 100644 (file)
        APPLET(pwd, pwd_main, _BB_DIR_BIN, _BB_SUID_NEVER)
 #endif
 #ifdef CONFIG_RDATE
-       APPLET(rdate, rdate_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+       APPLET(rdate, rdate_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)
 #endif
 #ifdef CONFIG_READLINK
        APPLET(readlink, readlink_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
index 094eae8d996ebd1dc4d1d6c05bd003c2ed75ec86..bf1ad949e0a7027ceeed0bf5ecfc0830119e048d 100644 (file)
        "/root\n"
 
 #define rdate_trivial_usage \
-       "[OPTION] HOST"
+       "[-sp] HOST"
 #define rdate_full_usage \
        "Get and possibly set the system date and time from a remote HOST.\n\n" \
        "Options:\n" \
index 3c3b152a22657462375cd673a4d479255fb6c0cc..a5699ebf4d1808a593dc33eb729a7f75961f00e3 100644 (file)
@@ -48,7 +48,7 @@ static time_t askremotedate(const char *host)
 
        fd = xconnect(host, port);
 
-       if (read(fd, (void *)&nett, 4) != 4)    /* read time from server */
+       if (safe_read(fd, (void *)&nett, 4) != 4)    /* read time from server */
                bb_error_msg_and_die("%s did not send the complete time", host);
 
        close(fd);