Merge remote-tracking branch 'OE-2.1/master' into vuplus-3.0
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-extended / ethtool / ethtool / vuplus.patch
1 diff --git a/ethtool.c b/ethtool.c
2 index acac32a..a47daaa 100644
3 --- a/ethtool.c
4 +++ b/ethtool.c
5 @@ -2253,6 +2253,25 @@ static int do_gset(struct cmd_context *ctx)
6         } else if (errno != EOPNOTSUPP) {
7                 perror("Cannot get link status");
8         }
9 +       else{
10 +               err = send_ioctl(ctx, &edata);
11 +               if (err < 0)
12 +               {
13 +                       fprintf(stdout,"SIOCGIFFLAGS error \n");
14 +               }
15 +               else
16 +               {
17 +                       if((ctx->ifr.ifr_flags & IFF_RUNNING))
18 +                       {
19 +                               fprintf(stdout, "       Link detected: yes\n");
20 +                       }
21 +                       else
22 +                       {
23 +                               fprintf(stdout, "       Link detected: no\n");
24 +                       }
25 +                       allfail = 0;
26 +               }
27 +       }
28  
29         if (allfail) {
30                 fprintf(stdout, "No data available\n");