Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/networking/vconfig.c

    r1765 r2725  
    55 * Copyright (C) 2001  Manuel Novoa III  <mjn3@codepoet.org>
    66 *
    7  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    88 */
    99
     
    4848};
    4949
    50 #define VLAN_GROUP_ARRAY_LEN 4096
    51 #define SIOCSIFVLAN 0x8983      /* Set 802.1Q VLAN options */
     50#define VLAN_GROUP_ARRAY_LEN  4096
     51#define SIOCSIFVLAN           0x8983  /* Set 802.1Q VLAN options */
    5252
    53 /* On entry, table points to the length of the current string plus
    54  * nul terminator plus data length for the subsequent entry.  The
    55  * return value is the last data entry for the matching string. */
     53/* On entry, table points to the length of the current string
     54 * plus NUL terminator plus data length for the subsequent entry.
     55 * The return value is the last data entry for the matching string. */
    5656static const char *xfind_str(const char *table, const char *str)
    5757{
    5858    while (strcasecmp(str, table+1) != 0) {
    59         if (!*(table += table[0])) {
     59        table += table[0];
     60        if (!*table) {
    6061            bb_show_usage();
    6162        }
     
    107108static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config";
    108109
    109 int vconfig_main(int argc, char **argv);
     110int vconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
    110111int vconfig_main(int argc, char **argv)
    111112{
     
    122123    xopen(conf_file_name, O_RDONLY);
    123124
    124     memset(&ifr, 0, sizeof(struct vlan_ioctl_args));
     125    memset(&ifr, 0, sizeof(ifr));
    125126
    126127    ++argv;
     
    134135        ifr.u.name_type = *xfind_str(name_types+1, argv[1]);
    135136    } else {
    136         if (strlen(argv[1]) >= IF_NAMESIZE) {
    137             bb_error_msg_and_die("if_name >= %d chars", IF_NAMESIZE);
    138         }
    139         strcpy(ifr.device1, argv[1]);
     137        strncpy_IFNAMSIZ(ifr.device1, argv[1]);
    140138        p = argv[2];
    141139
Note: See TracChangeset for help on using the changeset viewer.