Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/miscutils/adjtimex.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 56  static const char ret_code_descript[] = Line 56  static const char ret_code_descript[] =
56  ;  ;
57    
58  int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
59  int adjtimex_main(int argc, char **argv)  int adjtimex_main(int argc UNUSED_PARAM, char **argv)
60  {  {
61   enum {   enum {
62   OPT_quiet = 0x1   OPT_quiet = 0x1
# Line 66  int adjtimex_main(int argc, char **argv) Line 66  int adjtimex_main(int argc, char **argv)
66   struct timex txc;   struct timex txc;
67   int i, ret;   int i, ret;
68   const char *descript;   const char *descript;
  txc.modes=0;  
69    
70     opt_complementary = "=0"; /* no valid non-option parameters */
71   opt = getopt32(argv, "qo:f:p:t:",   opt = getopt32(argv, "qo:f:p:t:",
72   &opt_o, &opt_f, &opt_p, &opt_t);   &opt_o, &opt_f, &opt_p, &opt_t);
73     txc.modes = 0;
74   //if (opt & 0x1) // -q   //if (opt & 0x1) // -q
75   if (opt & 0x2) { // -o   if (opt & 0x2) { // -o
76   txc.offset = xatol(opt_o);   txc.offset = xatol(opt_o);
# Line 87  int adjtimex_main(int argc, char **argv) Line 88  int adjtimex_main(int argc, char **argv)
88   txc.tick = xatol(opt_t);   txc.tick = xatol(opt_t);
89   txc.modes |= ADJ_TICK;   txc.modes |= ADJ_TICK;
90   }   }
  if (argc != optind) { /* no valid non-option parameters */  
  bb_show_usage();  
  }  
91    
92   ret = adjtimex(&txc);   ret = adjtimex(&txc);
93    

Legend:
Removed from v.983  
changed lines
  Added in v.984