我正在移植一些将
tty_ldisc_ops.ioctl()
定义为的代码:
static int ...ldisc_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
但是当前规格是:
static int ...ldisc_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
“文件”参数发生了什么?我寻找更改日志和来源。
我从(https://mirrors.edge.kernel.org/pub/linux/kernel/v2.1/)随机获取了一个旧内核。
int n_tty_ioctl(struct tty_struct * tty, struct file * file,
unsigned int cmd, unsigned long arg) { ... tty->driver.ioctl(tty, file, cmd, arg); ...
tty.h, struct tty_struct { ... struct tty_driver driver; ...
tty_driver.h: struct tty_driver { ... int (*ioctl)(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg); ...
然后小路就变冷了。