Messages in this thread | | | Date | Sun, 21 Mar 2004 01:24:35 -0500 | From | linguist@masterli ... |
| |
This is just a random observation, I don't know this piece of code or the kernel in general, but instinct tells me that where is says "if (!fd) return -EBADF", it should say "if (!file) return -EBADF". Just a heads up.
Regards, Rich
static int tiocgdev(unsigned fd, unsigned cmd, unsigned int *ptr) {
struct file *file = fget(fd); struct tty_struct *real_tty;
if (!fd) return -EBADF; if (file->f_op->ioctl != tty_ioctl) return -EINVAL; real_tty = (struct tty_struct *)file->private_data; if (!real_tty) return -EINVAL; return put_user(new_encode_dev(tty_devnum(real_tty)), ptr); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |