source: trunk/make/busybox/patches/903-ip_older_kernels.patch @ 5409

Letzte Änderung dieser Datei seit 5409 war 5409, erstellt von Whoopie vor 6 Jahren

busybox:

  • ip applet: add compability patch for older kernels (refs #930)
  • sed applet: add upstream bugfix patch
Dateigröße: 1.7 KB
  • networking/libiproute/ipaddress.c

     
    164164        printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1)); 
    165165    } 
    166166#endif 
     167#ifdef IFLA_OPERSTATE 
    167168    if (tb[IFLA_OPERSTATE]) { 
    168169        static const char operstate_labels[] ALIGN1 = 
    169170            "UNKNOWN\0""NOTPRESENT\0""DOWN\0""LOWERLAYERDOWN\0" 
     
    171172        printf("state %s ", nth_string(operstate_labels, 
    172173                    *(uint8_t *)RTA_DATA(tb[IFLA_OPERSTATE]))); 
    173174    } 
     175#endif 
    174176    if (G_filter.showqueue) 
    175177        print_queuelen((char*)RTA_DATA(tb[IFLA_IFNAME])); 
    176178 
  • networking/libiproute/iplink.c

     
    274274    return ipaddr_list_or_flush(argv, 0); 
    275275} 
    276276 
     277#ifdef IFLA_LINKINFO 
    277278#ifndef NLMSG_TAIL 
    278279#define NLMSG_TAIL(nmsg) \ 
    279280    ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) 
     
    360361        return 2; 
    361362    return 0; 
    362363} 
     364#endif 
    363365 
    364366/* Return value becomes exitcode. It's okay to not return at all */ 
    365367int do_iplink(char **argv) 
    366368{ 
    367369    static const char keywords[] ALIGN1 = 
     370#ifdef IFLA_LINKINFO 
    368371        "add\0""delete\0""set\0""show\0""lst\0""list\0"; 
     372#else 
     373        "set\0""show\0""lst\0""list\0"; 
     374#endif 
    369375    if (*argv) { 
    370376        smalluint key = index_in_substrings(keywords, *argv); 
    371377        if (key > 5) /* invalid argument */ 
    372378            bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name); 
    373379        argv++; 
     380#ifdef IFLA_LINKINFO 
    374381        if (key <= 1) /* add/delete */ 
    375382            return do_change(argv, key ? RTM_DELLINK : RTM_NEWLINK); 
    376383        else if (key == 2) /* set */ 
     384#else 
     385        if (key == 0) /* set */ 
     386#endif 
    377387            return do_set(argv); 
    378388    } 
    379389    /* show, lst, list */ 
Hinweis: Hilfe zum Repository-Browser finden Sie in TracBrowser.