Explorar el Código

[net][sal] Improve ioctl interface to support for socketfd operations

Signed-off-by: chenyong <1521761801@qq.com>
chenyong hace 6 años
padre
commit
25ebcc9c33
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      components/net/sal_socket/dfs_net/dfs_net.c

+ 3 - 1
components/net/sal_socket/dfs_net/dfs_net.c

@@ -35,7 +35,9 @@ int dfs_net_getsocket(int fd)
 
 static int dfs_net_ioctl(struct dfs_fd* file, int cmd, void* args)
 {
-    return -EIO;
+    int socket = (int) file->data;
+
+    return sal_ioctlsocket(socket, cmd, args);
 }
 
 static int dfs_net_read(struct dfs_fd* file, void *buf, size_t count)