You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/07 02:41:16 UTC

[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7014: net/netdev: correct return value of SIOCGIFFLAGS/SIOCGIFCOUNT

anchao commented on code in PR #7014:
URL: https://github.com/apache/incubator-nuttx/pull/7014#discussion_r964329303


##########
net/netdev/netdev_ioctl.c:
##########
@@ -905,9 +905,12 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
           if (dev)
             {
               req->ifr_flags = dev->d_flags;
+              ret = OK;
+            }
+          else
+            {
+              ret = -ENODEV;

Review Comment:
   Done



##########
net/netdev/netdev_ioctl.c:
##########
@@ -992,6 +996,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
 #endif
                 {
                   nerr("Unsupported link layer\n");
+                  ret = -ENOSYS;

Review Comment:
   Done



##########
net/netdev/netdev_ioctl.c:
##########
@@ -947,6 +950,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
 #endif
                 {
                   nerr("Unsupported link layer\n");
+                  ret = -ENOSYS;

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org