xiaoxiang781216 commented on code in PR #7014: URL: https://github.com/apache/incubator-nuttx/pull/7014#discussion_r964017175
########## 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: ditto ########## 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: why change the error code to -ENOSYS? ENOSYS mean OS doesn't support the functionality yet, it isn't good to indicate that netdev hasn't hardware address. ########## 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: let's set ret = -ENODEV at line 640 and remove other places which set ret to -ENODEV -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org