From vda at busybox.net Fri Nov 2 16:31:11 2007 From: vda at busybox.net (vda at busybox.net) Date: Fri, 2 Nov 2007 16:31:11 -0700 (PDT) Subject: svn commit: trunk/busybox: libbb modutils Message-ID: <20071102233111.55E85A6AB6@busybox.net> Author: vda Date: 2007-11-02 16:31:10 -0700 (Fri, 02 Nov 2007) New Revision: 20354 Log: insmod: code shrink, stop exporting insmod_ng_main. function old new delta add_ksymoops_symbols - 421 +421 static.section_names 20 40 +20 lsmod_main 425 424 -1 set_tainted 153 150 -3 main_opts 4 - -4 obj_symbol_patch 47 42 -5 obj_string_patch 144 139 -5 already_loaded 144 138 -6 check_dep 348 341 -7 append_option 75 68 -7 obj_allocate_commons 515 501 -14 new_process_module_arguments 1039 1018 -21 arch_new_symbol 31 9 -22 check_module_name_match 85 61 -24 obj_create_alloced_section 164 136 -28 include_conf 930 902 -28 modprobe_main 1643 1535 -108 obj_load 924 777 -147 insmod_ng_main 245 - -245 insmod_main 4122 3794 -328 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/16 up/down: 441/-1003) Total: -562 bytes text data bss dec hex filename 776020 974 9420 786414 bffee busybox_old 775384 974 9420 785778 bfd72 busybox_unstripped Modified: trunk/busybox/libbb/xreadlink.c trunk/busybox/modutils/insmod.c trunk/busybox/modutils/lsmod.c trunk/busybox/modutils/modprobe.c Changeset: Sorry, the patch is too large to include (1586 lines). Please use ViewCVS to see it! http://busybox.net/cgi-bin/viewcvs.cgi?view=rev&root=svn&rev=20354 From vda at busybox.net Sat Nov 3 16:17:41 2007 From: vda at busybox.net (vda at busybox.net) Date: Sat, 3 Nov 2007 16:17:41 -0700 (PDT) Subject: svn commit: branches/busybox_1_7_stable: coreutils include networking networking etc... Message-ID: <20071103231741.93754A65E9@busybox.net> Author: vda Date: 2007-11-03 16:17:40 -0700 (Sat, 03 Nov 2007) New Revision: 20356 Log: apply accumulated post 1.7.2 patches; bump version to 1.7.3 Modified: branches/busybox_1_7_stable/Makefile branches/busybox_1_7_stable/coreutils/tail.c branches/busybox_1_7_stable/include/libbb.h branches/busybox_1_7_stable/networking/httpd.c branches/busybox_1_7_stable/networking/inetd.c branches/busybox_1_7_stable/networking/libiproute/iptunnel.c branches/busybox_1_7_stable/shell/ash.c branches/busybox_1_7_stable/sysklogd/logger.c Changeset: Modified: branches/busybox_1_7_stable/Makefile =================================================================== --- branches/busybox_1_7_stable/Makefile 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/Makefile 2007-11-03 23:17:40 UTC (rev 20356) @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 7 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Unnamed Modified: branches/busybox_1_7_stable/coreutils/tail.c =================================================================== --- branches/busybox_1_7_stable/coreutils/tail.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/coreutils/tail.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -47,13 +47,16 @@ static ssize_t tail_read(int fd, char *buf, size_t count) { ssize_t r; - off_t current, end; + off_t current; struct stat sbuf; - end = current = lseek(fd, 0, SEEK_CUR); - if (!fstat(fd, &sbuf)) - end = sbuf.st_size; - lseek(fd, end < current ? 0 : current, SEEK_SET); + /* (A good comment is missing here) */ + current = lseek(fd, 0, SEEK_CUR); + /* /proc files report zero st_size, don't lseek them. */ + if (fstat(fd, &sbuf) == 0 && sbuf.st_size) + if (sbuf.st_size < current) + lseek(fd, 0, SEEK_SET); + r = safe_read(fd, buf, count); if (r < 0) { bb_perror_msg(bb_msg_read_error); @@ -67,8 +70,12 @@ static unsigned eat_num(const char *p) { - if (*p == '-') p++; - else if (*p == '+') { p++; G.status = EXIT_FAILURE; } + if (*p == '-') + p++; + else if (*p == '+') { + p++; + G.status = EXIT_FAILURE; + } return xatou_sfx(p, tail_suffixes); } Modified: branches/busybox_1_7_stable/include/libbb.h =================================================================== --- branches/busybox_1_7_stable/include/libbb.h 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/include/libbb.h 2007-11-03 23:17:40 UTC (rev 20356) @@ -776,7 +776,7 @@ extern void bb_do_delay(int seconds); extern void change_identity(const struct passwd *pw); extern const char *change_identity_e2str(const struct passwd *pw); -extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args); +extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN; #if ENABLE_SELINUX extern void renew_current_security_context(void); extern void set_current_security_context(security_context_t sid); Modified: branches/busybox_1_7_stable/networking/httpd.c =================================================================== --- branches/busybox_1_7_stable/networking/httpd.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/networking/httpd.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -1186,6 +1186,9 @@ * and send it to the peer. So please no SIGPIPEs! */ signal(SIGPIPE, SIG_IGN); + /* Accound for POSTDATA already in hdr_buf */ + bodyLen -= hdr_cnt; + /* This loop still looks messy. What is an exit criteria? * "CGI's output closed"? Or "CGI has exited"? * What to do if CGI has closed both input and output, but Modified: branches/busybox_1_7_stable/networking/inetd.c =================================================================== --- branches/busybox_1_7_stable/networking/inetd.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/networking/inetd.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -734,7 +734,8 @@ /* if ((arg = skip(&cp, 1)) == NULL) */ /* goto more; */ - sep->se_server = xxstrdup(skip(&cp)); + arg = skip(&cp); + sep->se_server = xxstrdup(arg); if (strcmp(sep->se_server, "internal") == 0) { #ifdef INETD_FEATURE_ENABLED const struct builtin *bi; @@ -759,7 +760,7 @@ sep->se_bi = NULL; #endif argc = 0; - for (arg = skip(&cp); cp; arg = skip(&cp)) { + for (; cp; arg = skip(&cp)) { if (argc < MAXARGV) sep->se_argv[argc++] = xxstrdup(arg); } Modified: branches/busybox_1_7_stable/networking/libiproute/iptunnel.c =================================================================== --- branches/busybox_1_7_stable/networking/libiproute/iptunnel.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/networking/libiproute/iptunnel.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -241,12 +241,12 @@ } else if (key == ARG_remote) { NEXT_ARG(); key = index_in_strings(keywords, *argv); - if (key == ARG_any) + if (key != ARG_any) p->iph.daddr = get_addr32(*argv); } else if (key == ARG_local) { NEXT_ARG(); key = index_in_strings(keywords, *argv); - if (key == ARG_any) + if (key != ARG_any) p->iph.saddr = get_addr32(*argv); } else if (key == ARG_dev) { NEXT_ARG(); Modified: branches/busybox_1_7_stable/shell/ash.c =================================================================== --- branches/busybox_1_7_stable/shell/ash.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/shell/ash.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -4379,6 +4379,7 @@ /* Lives far away from here, needed for forkchild */ static void closescript(void); + /* Called after fork(), in child */ static void forkchild(struct job *jp, union node *n, int mode) @@ -4423,15 +4424,8 @@ setsignal(SIGQUIT); setsignal(SIGTERM); } -#if JOBS - /* For "jobs | cat" to work like in bash, we must retain list of jobs - * in child, but we do need to remove ourself */ - if (jp) - freejob(jp); -#else for (jp = curjob; jp; jp = jp->prev_job) freejob(jp); -#endif jobless = 0; } Modified: branches/busybox_1_7_stable/sysklogd/logger.c =================================================================== --- branches/busybox_1_7_stable/sysklogd/logger.c 2007-11-03 07:23:18 UTC (rev 20355) +++ branches/busybox_1_7_stable/sysklogd/logger.c 2007-11-03 23:17:40 UTC (rev 20356) @@ -107,7 +107,7 @@ argv += optind; if (!argc) { #define strbuf bb_common_bufsiz1 - while (fgets(strbuf, BUFSIZ, stdin)) { + while (fgets(strbuf, COMMON_BUFSIZE, stdin)) { if (strbuf[0] && NOT_LONE_CHAR(strbuf, '\n') ) { @@ -117,11 +117,11 @@ } } else { char *message = NULL; - int len = 1; /* for NUL */ + int len = 0; int pos = 0; do { len += strlen(*argv) + 1; - message = xrealloc(message, len); + message = xrealloc(message, len + 1); sprintf(message + pos, " %s", *argv), pos = len; } while (*++argv); From vda at busybox.net Sat Nov 3 16:18:26 2007 From: vda at busybox.net (vda at busybox.net) Date: Sat, 3 Nov 2007 16:18:26 -0700 (PDT) Subject: svn commit: tags Message-ID: <20071103231826.8D0A4A614E@busybox.net> Author: vda Date: 2007-11-03 16:18:26 -0700 (Sat, 03 Nov 2007) New Revision: 20357 Log: create tags/busybox_1_7_3 Added: tags/busybox_1_7_3/ Changeset: Copied: tags/busybox_1_7_3 (from rev 20356, branches/busybox_1_7_stable) From vda at busybox.net Sat Nov 3 17:46:03 2007 From: vda at busybox.net (vda at busybox.net) Date: Sat, 3 Nov 2007 17:46:03 -0700 (PDT) Subject: svn commit: trunk/busybox/findutils Message-ID: <20071104004603.E97DBA6885@busybox.net> Author: vda Date: 2007-11-03 17:46:03 -0700 (Sat, 03 Nov 2007) New Revision: 20358 Log: grep: fix -Fo Modified: trunk/busybox/findutils/grep.c Changeset: Modified: trunk/busybox/findutils/grep.c =================================================================== --- trunk/busybox/findutils/grep.c 2007-11-03 23:18:26 UTC (rev 20357) +++ trunk/busybox/findutils/grep.c 2007-11-04 00:46:03 UTC (rev 20358) @@ -174,7 +174,7 @@ while ((line = xmalloc_getline(file)) != NULL) { llist_t *pattern_ptr = pattern_head; - grep_list_data_t *gl; + grep_list_data_t *gl = gl; /* for gcc */ linenum++; found = 0; @@ -274,8 +274,15 @@ print_n_lines_after = lines_after; #endif if (option_mask32 & OPT_o) { - line[regmatch.rm_eo] = '\0'; - print_line(line + regmatch.rm_so, linenum, ':'); + if (FGREP_FLAG) { + /* -Fo just prints the pattern + * (unless -v: -Fov doesnt print anything at all) */ + if (found) + print_line(gl->pattern, linenum, ':'); + } else { + line[regmatch.rm_eo] = '\0'; + print_line(line + regmatch.rm_so, linenum, ':'); + } } else { print_line(line, linenum, ':'); } From vda at busybox.net Sat Nov 3 21:10:18 2007 From: vda at busybox.net (vda at busybox.net) Date: Sat, 3 Nov 2007 21:10:18 -0700 (PDT) Subject: svn commit: trunk/busybox: include libbb miscutils networking Message-ID: <20071104041018.7CCB1A6811@busybox.net> Author: vda Date: 2007-11-03 21:10:17 -0700 (Sat, 03 Nov 2007) New Revision: 20359 Log: ifconfig: code shrink adjtimex: code shrink libbb: move nth_string function into libbb hdparm: nth_string was here text data bss dec hex filename 730013 10334 12032 752379 b7afb busybox_old 730093 10134 12032 752259 b7a83 busybox_unstripped Modified: trunk/busybox/include/libbb.h trunk/busybox/libbb/compare_string_array.c trunk/busybox/miscutils/adjtimex.c trunk/busybox/miscutils/hdparm.c trunk/busybox/networking/ifconfig.c Changeset: Modified: trunk/busybox/include/libbb.h =================================================================== --- trunk/busybox/include/libbb.h 2007-11-04 00:46:03 UTC (rev 20358) +++ trunk/busybox/include/libbb.h 2007-11-04 04:10:17 UTC (rev 20359) @@ -846,10 +846,13 @@ /* Returns a ptr to static storage */ extern char *pw_encrypt(const char *clear, const char *salt); extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); -extern int index_in_str_array(const char *const string_array[], const char *key); -extern int index_in_strings(const char *strings, const char *key); -extern int index_in_substr_array(const char *const string_array[], const char *key); -extern int index_in_substrings(const char *strings, const char *key); + +int index_in_str_array(const char *const string_array[], const char *key); +int index_in_strings(const char *strings, const char *key); +int index_in_substr_array(const char *const string_array[], const char *key); +int index_in_substrings(const char *strings, const char *key); +const char *nth_string(const char *strings, int n); + extern void print_login_issue(const char *issue_file, const char *tty); extern void print_login_prompt(void); Modified: trunk/busybox/libbb/compare_string_array.c =================================================================== --- trunk/busybox/libbb/compare_string_array.c 2007-11-04 00:46:03 UTC (rev 20358) +++ trunk/busybox/libbb/compare_string_array.c 2007-11-04 04:10:17 UTC (rev 20359) @@ -67,3 +67,12 @@ } return -1; } + +const char *nth_string(const char *strings, int n) +{ + while (n) { + n--; + strings += strlen(strings) + 1; + } + return strings; +} Modified: trunk/busybox/miscutils/adjtimex.c =================================================================== --- trunk/busybox/miscutils/adjtimex.c 2007-11-04 00:46:03 UTC (rev 20358) +++ trunk/busybox/miscutils/adjtimex.c 2007-11-04 04:10:17 UTC (rev 20359) @@ -14,34 +14,46 @@ #include "libbb.h" #include -static const struct { - int bit; - const char *name; -} statlist[] = { - { STA_PLL, "PLL" }, - { STA_PPSFREQ, "PPSFREQ" }, - { STA_PPSTIME, "PPSTIME" }, - { STA_FLL, "FFL" }, - { STA_INS, "INS" }, - { STA_DEL, "DEL" }, - { STA_UNSYNC, "UNSYNC" }, - { STA_FREQHOLD, "FREQHOLD" }, - { STA_PPSSIGNAL, "PPSSIGNAL" }, - { STA_PPSJITTER, "PPSJITTER" }, - { STA_PPSWANDER, "PPSWANDER" }, - { STA_PPSERROR, "PPSERROR" }, - { STA_CLOCKERR, "CLOCKERR" }, - { 0, NULL } +static const uint16_t statlist_bit[] = { + STA_PLL, + STA_PPSFREQ, + STA_PPSTIME, + STA_FLL, + STA_INS, + STA_DEL, + STA_UNSYNC, + STA_FREQHOLD, + STA_PPSSIGNAL, + STA_PPSJITTER, + STA_PPSWANDER, + STA_PPSERROR, + STA_CLOCKERR, + 0 }; +static const char statlist_name[] = + "PLL" "\0" + "PPSFREQ" "\0" + "PPSTIME" "\0" + "FFL" "\0" + "INS" "\0" + "DEL" "\0" + "UNSYNC" "\0" + "FREQHOLD" "\0" + "PPSSIGNAL" "\0" + "PPSJITTER" "\0" + "PPSWANDER" "\0" + "PPSERROR" "\0" + "CLOCKERR" +; -static const char *const ret_code_descript[] = { - "clock synchronized", - "insert leap second", - "delete leap second", - "leap second in progress", - "leap second has occurred", +static const char ret_code_descript[] = + "clock synchronized" "\0" + "insert leap second" "\0" + "delete leap second" "\0" + "leap second in progress" "\0" + "leap second has occurred" "\0" "clock not synchronized" -}; +; int adjtimex_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int adjtimex_main(int argc, char **argv) @@ -52,7 +64,7 @@ unsigned opt; char *opt_o, *opt_f, *opt_p, *opt_t; struct timex txc; - int i, ret, sep; + int i, ret; const char *descript; txc.modes=0; @@ -81,33 +93,42 @@ ret = adjtimex(&txc); - if (ret < 0) perror("adjtimex"); + if (ret < 0) { + bb_perror_nomsg_and_die(); + } - if (!(opt & OPT_quiet) && ret>=0) { + if (!(opt & OPT_quiet)) { + int sep; + const char *name; + printf( " mode: %d\n" "-o offset: %ld\n" "-f frequency: %ld\n" " maxerror: %ld\n" " esterror: %ld\n" - " status: %d ( ", + " status: %d (", txc.modes, txc.offset, txc.freq, txc.maxerror, txc.esterror, txc.status); /* representative output of next code fragment: "PLL | PPSTIME" */ - sep=0; - for (i=0; statlist[i].name; i++) { - if (txc.status & statlist[i].bit) { - if (sep) fputs(" | ",stdout); - fputs(statlist[i].name,stdout); - sep=1; + name = statlist_name; + sep = 0; + for (i = 0; statlist_bit[i]; i++) { + if (txc.status & statlist_bit[i]) { + if (sep) + fputs(" | ", stdout); + fputs(name, stdout); + sep = 1; } + name += strlen(name) + 1; } descript = "error"; - if (ret >= 0 && ret <= 5) descript = ret_code_descript[ret]; - printf(" )\n" + if (ret <= 5) + descript = nth_string(ret_code_descript, ret); + printf(")\n" "-p timeconstant: %ld\n" " precision: %ld\n" " tolerance: %ld\n" @@ -119,5 +140,6 @@ txc.precision, txc.tolerance, txc.tick, (long)txc.time.tv_sec, (long)txc.time.tv_usec, ret, descript); } - return (ret<0); + + return 0; } Modified: trunk/busybox/miscutils/hdparm.c =================================================================== --- trunk/busybox/miscutils/hdparm.c 2007-11-04 00:46:03 UTC (rev 20358) +++ trunk/busybox/miscutils/hdparm.c 2007-11-04 04:10:17 UTC (rev 20359) @@ -491,15 +491,6 @@ return err_dma; } -static const char *nth_str(const char *strings, int n) -{ - while (n) { - n--; - strings += strlen(strings) + 1; - } - return strings; -} - static const char pkt_str[] ALIGN1 = "Direct-access device" "\0" /* word 0, bits 12-8 = 00 */ "Sequential-access device" "\0" /* word 0, bits 12-8 = 01 */ @@ -710,7 +701,7 @@ } else if (!(val[GEN_CONFIG] & NOT_ATAPI)) { dev = ATAPI_DEV; eqpt = (val[GEN_CONFIG] & EQPT_TYPE) >> SHIFT_EQPT; - printf("ATAPI %s, with ", eqpt <= 0xf ? nth_str(pkt_str, eqpt) : "unknown"); + printf("ATAPI %s, with ", eqpt <= 0xf ? nth_string(pkt_str, eqpt) : "unknown"); like_std = 3; } else /* "Unknown device type:\n\tbits 15&14 of general configuration word 0 both set to 1.\n" */ @@ -748,7 +739,7 @@ if (val[MINOR] && (val[MINOR] <= MINOR_MAX)) { if (like_std < 3) like_std = 3; std = actual_ver[val[MINOR]]; - if (std) printf("\n\tUsed: %s ", nth_str(minor_str, val[MINOR])); + if (std) printf("\n\tUsed: %s ", nth_string(minor_str, val[MINOR])); } /* looks like when they up-issue the std, they obsolete one; @@ -847,7 +838,7 @@ jj = val[GEN_CONFIG] >> 1; for (ii = 1; ii < 15; ii++) { if (jj & 0x0001) - printf("\t%s\n", nth_str(ata1_cfg_str, ii)); + printf("\t%s\n", nth_string(ata1_cfg_str, ii)); jj >>=1; } } @@ -1070,7 +1061,7 @@ jj = val[CMDS_SUPP_0]; kk = val[CMDS_EN_0]; for (ii = 0; ii < NUM_CMD_FEAT_STR; ii++) { - const char *feat_str = nth_str(cmd_feat_str, ii); + const char *feat_str = nth_string(cmd_feat_str, ii); if ((jj & 0x8000) && (*feat_str != '\0')) { printf("\t%s\t%s\n", (kk & 0x8000) ? " *" : "", feat_str); } @@ -1088,7 +1079,7 @@ } /* Removable Media Status Notification feature set */ if ((val[RM_STAT] & RM_STAT_BITS) == RM_STAT_SUP) - printf("\t%s supported\n", nth_str(cmd_feat_str, 27)); + printf("\t%s supported\n", nth_string(cmd_feat_str, 27)); /* security */ if ((eqpt != CDROM) && (like_std > 3) @@ -1100,7 +1091,7 @@ jj = val[SECU_STATUS]; if (jj) { for (ii = 0; ii < NUM_SECU_STR; ii++) { - printf("\t%s\t%s\n", (!(jj & 0x0001)) ? "not" : "", nth_str(secu_str, ii)); + printf("\t%s\t%s\n", (!(jj & 0x0001)) ? "not" : "", nth_string(secu_str, ii)); jj >>=1; } if (val[SECU_STATUS] & SECU_ENABLED) { @@ -1182,13 +1173,13 @@ id->model, id->fw_rev, id->serial_no); for (i = 0; i <= 15; i++) { if (id->config & (1<cyls, id->heads, id->sectors, id->track_bytes, id->sector_bytes, id->ecc_bytes, - id->buf_type, nth_str(BuffType, (id->buf_type > 3) ? 0 : id->buf_type), + id->buf_type, nth_string(BuffType, (id->buf_type > 3) ? 0 : id->buf_type), id->buf_size/2, id->max_multsect); if (id->max_multsect) { printf(", MultSect="); @@ -1294,7 +1285,7 @@ if ((id->minor_rev_num && id->minor_rev_num <= 31) || (id->major_rev_num && id->minor_rev_num <= 31) ) { - printf("\n Drive conforms to: %s: ", (id->minor_rev_num <= 31) ? nth_str(minor_str, id->minor_rev_num) : "unknown"); + printf("\n Drive conforms to: %s: ", (id->minor_rev_num <= 31) ? nth_string(minor_str, id->minor_rev_num) : "unknown"); if (id->major_rev_num != 0x0000 && /* NOVAL_0 */ id->major_rev_num != 0xFFFF) { /* NOVAL_1 */ for (i = 0; i <= 15; i++) { Modified: trunk/busybox/networking/ifconfig.c =================================================================== --- trunk/busybox/networking/ifconfig.c 2007-11-04 00:46:03 UTC (rev 20358) +++ trunk/busybox/networking/ifconfig.c 2007-11-04 04:10:17 UTC (rev 20359) @@ -164,7 +164,7 @@ struct arg1opt { const char *name; - int selector; + unsigned short selector; unsigned short ifr_offset; }; @@ -183,70 +183,70 @@ #define ifreq_offsetof(x) offsetof(struct ifreq, x) static const struct arg1opt Arg1Opt[] = { - {"SIOCSIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric)}, - {"SIOCSIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu)}, - {"SIOCSIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen)}, - {"SIOCSIFDSTADDR", SIOCSIFDSTADDR, ifreq_offsetof(ifr_dstaddr)}, - {"SIOCSIFNETMASK", SIOCSIFNETMASK, ifreq_offsetof(ifr_netmask)}, - {"SIOCSIFBRDADDR", SIOCSIFBRDADDR, ifreq_offsetof(ifr_broadaddr)}, + { "SIFMETRIC", SIOCSIFMETRIC, ifreq_offsetof(ifr_metric) }, + { "SIFMTU", SIOCSIFMTU, ifreq_offsetof(ifr_mtu) }, + { "SIFTXQLEN", SIOCSIFTXQLEN, ifreq_offsetof(ifr_qlen) }, + { "SIFDSTADDR", SIOCSIFDSTADDR, ifreq_offsetof(ifr_dstaddr) }, + { "SIFNETMASK", SIOCSIFNETMASK, ifreq_offsetof(ifr_netmask) }, + { "SIFBRDADDR", SIOCSIFBRDADDR, ifreq_offsetof(ifr_broadaddr) }, #if ENABLE_FEATURE_IFCONFIG_HW - {"SIOCSIFHWADDR", SIOCSIFHWADDR, ifreq_offsetof(ifr_hwaddr)}, + { "SIFHWADDR", SIOCSIFHWADDR, ifreq_offsetof(ifr_hwaddr) }, #endif - {"SIOCSIFDSTADDR", SIOCSIFDSTADDR, ifreq_offsetof(ifr_dstaddr)}, + { "SIFDSTADDR", SIOCSIFDSTADDR, ifreq_offsetof(ifr_dstaddr) }, #ifdef SIOCSKEEPALIVE - {"SIOCSKEEPALIVE", SIOCSKEEPALIVE, ifreq_offsetof(ifr_data)}, + { "SKEEPALIVE", SIOCSKEEPALIVE, ifreq_offsetof(ifr_data) }, #endif #ifdef SIOCSOUTFILL - {"SIOCSOUTFILL", SIOCSOUTFILL, ifreq_offsetof(ifr_data)}, + { "SOUTFILL", SIOCSOUTFILL, ifreq_offsetof(ifr_data) }, #endif #if ENABLE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - {"SIOCSIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.mem_start)}, - {"SIOCSIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.base_addr)}, - {"SIOCSIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.irq)}, + { "SIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.mem_start) }, + { "SIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.base_addr) }, + { "SIFMAP", SIOCSIFMAP, ifreq_offsetof(ifr_map.irq) }, #endif /* Last entry if for unmatched (possibly hostname) arg. */ #if ENABLE_FEATURE_IPV6 - {"SIOCSIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr)}, /* IPv6 version ignores the offset */ - {"SIOCDIFADDR", SIOCDIFADDR, ifreq_offsetof(ifr_addr)}, /* IPv6 version ignores the offset */ + { "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) }, /* IPv6 version ignores the offset */ + { "DIFADDR", SIOCDIFADDR, ifreq_offsetof(ifr_addr) }, /* IPv6 version ignores the offset */ #endif - {"SIOCSIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr)}, + { "SIFADDR", SIOCSIFADDR, ifreq_offsetof(ifr_addr) }, }; static const struct options OptArray[] = { - {"metric", N_ARG, ARG_METRIC, 0}, - {"mtu", N_ARG, ARG_MTU, 0}, - {"txqueuelen", N_ARG, ARG_TXQUEUELEN, 0}, - {"dstaddr", N_ARG, ARG_DSTADDR, 0}, - {"netmask", N_ARG, ARG_NETMASK, 0}, - {"broadcast", N_ARG | M_CLR, ARG_BROADCAST, IFF_BROADCAST}, + { "metric", N_ARG, ARG_METRIC, 0 }, + { "mtu", N_ARG, ARG_MTU, 0 }, + { "txqueuelen", N_ARG, ARG_TXQUEUELEN, 0 }, + { "dstaddr", N_ARG, ARG_DSTADDR, 0 }, + { "netmask", N_ARG, ARG_NETMASK, 0 }, + { "broadcast", N_ARG | M_CLR, ARG_BROADCAST, IFF_BROADCAST }, #if ENABLE_FEATURE_IFCONFIG_HW - {"hw", N_ARG, ARG_HW, 0}, + { "hw", N_ARG, ARG_HW, 0 }, #endif - {"pointopoint", N_ARG | M_CLR, ARG_POINTOPOINT, IFF_POINTOPOINT}, + { "pointopoint", N_ARG | M_CLR, ARG_POINTOPOINT, IFF_POINTOPOINT }, #ifdef SIOCSKEEPALIVE - {"keepalive", N_ARG, ARG_KEEPALIVE, 0}, + { "keepalive", N_ARG, ARG_KEEPALIVE, 0 }, #endif #ifdef SIOCSOUTFILL - {"outfill", N_ARG, ARG_OUTFILL, 0}, + { "outfill", N_ARG, ARG_OUTFILL, 0 }, #endif #if ENABLE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ - {"mem_start", N_ARG, ARG_MEM_START, 0}, - {"io_addr", N_ARG, ARG_IO_ADDR, 0}, - {"irq", N_ARG, ARG_IRQ, 0}, + { "mem_start", N_ARG, ARG_MEM_START, 0 }, + { "io_addr", N_ARG, ARG_IO_ADDR, 0 }, + { "irq", N_ARG, ARG_IRQ, 0 }, #endif #if ENABLE_FEATURE_IPV6 - {"add", N_ARG, ARG_ADD_DEL, 0}, - {"del", N_ARG, ARG_ADD_DEL, 0}, + { "add", N_ARG, ARG_ADD_DEL, 0 }, + { "del", N_ARG, ARG_ADD_DEL, 0 }, #endif - {"arp", N_CLR | M_SET, 0, IFF_NOARP}, - {"trailers", N_CLR | M_SET, 0, IFF_NOTRAILERS}, - {"promisc", N_SET | M_CLR, 0, IFF_PROMISC}, - {"multicast", N_SET | M_CLR, 0, IFF_MULTICAST}, - {"allmulti", N_SET | M_CLR, 0, IFF_ALLMULTI}, - {"dynamic", N_SET | M_CLR, 0, IFF_DYNAMIC}, - {"up", N_SET, 0, (IFF_UP | IFF_RUNNING)}, - {"down", N_CLR, 0, IFF_UP}, - {NULL, 0, ARG_HOSTNAME, (IFF_UP | IFF_RUNNING)} + { "arp", N_CLR | M_SET, 0, IFF_NOARP }, + { "trailers", N_CLR | M_SET, 0, IFF_NOTRAILERS }, + { "promisc", N_SET | M_CLR, 0, IFF_PROMISC }, + { "multicast", N_SET | M_CLR, 0, IFF_MULTICAST }, + { "allmulti", N_SET | M_CLR, 0, IFF_ALLMULTI }, + { "dynamic", N_SET | M_CLR, 0, IFF_DYNAMIC }, + { "up", N_SET, 0, (IFF_UP | IFF_RUNNING) }, + { "down", N_CLR, 0, IFF_UP }, + { NULL, 0, ARG_HOSTNAME, (IFF_UP | IFF_RUNNING) } }; /* @@ -405,7 +405,7 @@ xioctl(sockfd6, SIOGIFINDEX, &ifr); ifr6.ifr6_ifindex = ifr.ifr_ifindex; ifr6.ifr6_prefixlen = prefix_len; - ioctl_or_perror_and_die(sockfd6, a1op->selector, &ifr6, "%s", a1op->name); + ioctl_or_perror_and_die(sockfd6, a1op->selector, &ifr6, "SIOC%s", a1op->name); if (ENABLE_FEATURE_CLEAN_UP) free(lsa); continue; @@ -457,7 +457,7 @@ *((int *) p) = i; } - ioctl_or_perror_and_die(sockfd, a1op->selector, &ifr, "%s", a1op->name); + ioctl_or_perror_and_die(sockfd, a1op->selector, &ifr, "SIOC%s", a1op->name); #ifdef QUESTIONABLE_ALIAS_CASE if (mask & A_COLON_CHK) { /* From vda at busybox.net Sat Nov 3 21:30:21 2007 From: vda at busybox.net (vda at busybox.net) Date: Sat, 3 Nov 2007 21:30:21 -0700 (PDT) Subject: svn commit: trunk/busybox/docs/busybox.net Message-ID: <20071104043021.304E4A65E9@busybox.net> Author: vda Date: 2007-11-03 21:30:20 -0700 (Sat, 03 Nov 2007) New Revision: 20360 Log: Announce 1.7.3 on website Modified: trunk/busybox/docs/busybox.net/news.html Changeset: Modified: trunk/busybox/docs/busybox.net/news.html =================================================================== --- trunk/busybox/docs/busybox.net/news.html 2007-11-04 04:10:17 UTC (rev 20359) +++ trunk/busybox/docs/busybox.net/news.html 2007-11-04 04:30:20 UTC (rev 20360) @@ -1,6 +1,16 @@