ethtool : add patch.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-extended / ethtool / ethtool / vuplus.patch
1 Index: ethtool-4/ethtool.c
2 ===================================================================
3 --- ethtool-4/ethtool.c (revision 3)
4 +++ ethtool-4/ethtool.c (working copy)
5 @@ -1578,6 +1578,27 @@
6         } else if (errno != EOPNOTSUPP) {
7                 perror("Cannot get link status");
8         }
9 +#if 1          /*      ikseong - check running flags   */
10 +       else
11 +       {
12 +               if(ioctl(fd, SIOCGIFFLAGS, ifr) < 0)
13 +               {
14 +                       fprintf(stdout,"SIOCGIFFLAGS error \n");
15 +               }
16 +               else
17 +               {
18 +                       if((ifr->ifr_flags & IFF_RUNNING))
19 +                       {
20 +                               fprintf(stdout, "       Link detected: yes\n");
21 +                       }
22 +                       else
23 +                       {
24 +                               fprintf(stdout, "       Link detected: no\n");
25 +                       }
26 +                       allfail=0;
27 +               }
28 +       }
29 +#endif
30
31         if (allfail) {
32                 fprintf(stdout, "No data available\n");