aboutsummaryrefslogtreecommitdiff
path: root/miscutils/adjtimex.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/adjtimex.c')
-rw-r--r--miscutils/adjtimex.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index 07f083428..c12a10b25 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -56,7 +56,7 @@ static const char ret_code_descript[] =
56; 56;
57 57
58int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 58int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
59int adjtimex_main(int argc, char **argv) 59int adjtimex_main(int argc UNUSED_PARAM, char **argv)
60{ 60{
61 enum { 61 enum {
62 OPT_quiet = 0x1 62 OPT_quiet = 0x1
@@ -66,10 +66,11 @@ int adjtimex_main(int argc, char **argv)
66 struct timex txc; 66 struct timex txc;
67 int i, ret; 67 int i, ret;
68 const char *descript; 68 const char *descript;
69 txc.modes=0;
70 69
70 opt_complementary = "=0"; /* no valid non-option parameters */
71 opt = getopt32(argv, "qo:f:p:t:", 71 opt = getopt32(argv, "qo:f:p:t:",
72 &opt_o, &opt_f, &opt_p, &opt_t); 72 &opt_o, &opt_f, &opt_p, &opt_t);
73 txc.modes = 0;
73 //if (opt & 0x1) // -q 74 //if (opt & 0x1) // -q
74 if (opt & 0x2) { // -o 75 if (opt & 0x2) { // -o
75 txc.offset = xatol(opt_o); 76 txc.offset = xatol(opt_o);
@@ -87,9 +88,6 @@ int adjtimex_main(int argc, char **argv)
87 txc.tick = xatol(opt_t); 88 txc.tick = xatol(opt_t);
88 txc.modes |= ADJ_TICK; 89 txc.modes |= ADJ_TICK;
89 } 90 }
90 if (argc != optind) { /* no valid non-option parameters */
91 bb_show_usage();
92 }
93 91
94 ret = adjtimex(&txc); 92 ret = adjtimex(&txc);
95 93