Changeset 1561
- Timestamp:
- 01/23/10 06:12:19 (6 months ago)
- Location:
- branches/batctl-0.2.x
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/batctl-0.2.x/proc.c
r1514 r1561 73 73 printf("Usage: batctl [options] originators \n"); 74 74 printf("options:\n"); 75 printf(" \t -b batch mode - read the originator table once and quit\n");76 75 printf(" \t -h print this help\n"); 77 76 printf(" \t -n don't replace mac addresses with bat-host names\n"); 77 printf(" \t -w watch mode - refresh the originator table continuously\n"); 78 78 } 79 79 … … 82 82 printf("Usage: batctl [options] translocal \n"); 83 83 printf("options:\n"); 84 printf(" \t -b batch mode - read the local translation table once and quit\n");85 84 printf(" \t -h print this help\n"); 86 85 printf(" \t -n don't replace mac addresses with bat-host names\n"); 86 printf(" \t -w watch mode - refresh the local translation table continuously\n"); 87 87 } 88 88 … … 91 91 printf("Usage: batctl [options] transglobal \n"); 92 92 printf("options:\n"); 93 printf(" \t -b batch mode - read the global translation table once and quit\n");94 93 printf(" \t -h print this help\n"); 95 94 printf(" \t -n don't replace mac addresses with bat-host names\n"); 95 printf(" \t -w watch mode - refresh the global translation table continuously\n"); 96 96 } 97 97 … … 119 119 int handle_table(int argc, char **argv, char *file_path, void table_usage(void)) 120 120 { 121 int optchar, read_opt = CLR_CONT_READ |USE_BAT_HOSTS;121 int optchar, read_opt = USE_BAT_HOSTS; 122 122 123 while ((optchar = getopt(argc, argv, " bhn")) != -1) {123 while ((optchar = getopt(argc, argv, "hnw")) != -1) { 124 124 switch (optchar) { 125 case 'b':126 read_opt &= ~CLR_CONT_READ;127 break;128 125 case 'h': 129 126 table_usage(); … … 131 128 case 'n': 132 129 read_opt &= ~USE_BAT_HOSTS; 130 break; 131 case 'w': 132 read_opt |= CLR_CONT_READ; 133 133 break; 134 134 default: -
branches/batctl-0.2.x/sys.c
r1509 r1561 37 37 printf("Note: if no logfile was specified stdin is read"); 38 38 printf("options:\n"); 39 printf(" \t -b batch mode - read the log file once and quit\n");40 39 printf(" \t -h print this help\n"); 41 40 printf(" \t -n don't replace mac addresses with bat-host names\n"); 41 printf(" \t -w watch mode - read the log file continuously\n"); 42 42 } 43 43 44 44 int log_print(int argc, char **argv) 45 45 { 46 int optchar, read_opt = CONT_READ |USE_BAT_HOSTS | LOG_MODE;46 int optchar, read_opt = USE_BAT_HOSTS | LOG_MODE; 47 47 int found_args = 1; 48 48 49 while ((optchar = getopt(argc, argv, " bhn")) != -1) {49 while ((optchar = getopt(argc, argv, "hnw")) != -1) { 50 50 switch (optchar) { 51 case 'b':52 read_opt &= ~CONT_READ;53 found_args += 1;54 break;55 51 case 'h': 56 52 log_usage(); … … 58 54 case 'n': 59 55 read_opt &= ~USE_BAT_HOSTS; 56 found_args += 1; 57 break; 58 case 'w': 59 read_opt |= CONT_READ; 60 60 found_args += 1; 61 61 break;
