[NET]: Add a dev_ioctl() fallback to sock_ioctl()

Currently all network protocols need to call dev_ioctl as the default
fallback in their ioctl implementations.  This patch adds a fallback
to dev_ioctl to sock_ioctl if the protocol returned -ENOIOCTLCMD.
This way all the procotol ioctl handlers can be simplified and we don't
need to export dev_ioctl.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
Christoph Hellwig
2006-01-03 14:18:33 -08:00
提交者 David S. Miller
父节点 5ff7630e4a
当前提交 b5e5fa5e09
修改 17 个文件,包含 27 行新增40 行删除

查看文件

@@ -1859,7 +1859,7 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
default:
err = dev_ioctl(cmd, (void __user *)arg);
err = -ENOIOCTLCMD;
break;
}
return err;