Re: [PATCH 4/4] ->compat_ioctl for 390 tape_char

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sünnavend 05 November 2005 00:51, Christoph Hellwig wrote:
> we return -ENOIOCTLCMD if we didn't have a valid compat ioctl, and in
> that case the vfs code will try to find it in the core translation
> table.

No, the function you wrote returns -ENOIOCTLCMD only if
device->discipline->ioctl_fn is NULL, otherwise it returns the
code it gets from that function, which is -EINVAL.

> I'm not sure moving everything from fs/compat_ioctl.c is a good idea.
> Everything that is just in a single driver or subsystem that has
> common ioctl code - sure.  else it doesn't make a lot of sense.

It turns out that almost everything is a single driver, the exceptions
are:

- tty ioctls: I move the conversion into drivers/char/tty_io.c with a
  relatively big switch() statement. All drivers implementing these
  use tty_operations.
- block ioctl: similar for drivers/block/ioctl.c
- net ioctl: similar for net/compat.c. I also add compat_ioctl methods
  for proto_ops.
- cdrom, tape, v4l: I create a new file that contains a compat_ioctl
  file operation that can be used in each driver, either by pointing
  directly to it or by calling it from their own compat_ioctl
  handler. The handlers end up calling f_op->ioctl() internally.
- file systems: many file systems implement EXT2_IOC_GETFLAGS etc.
  those are trivial to handle, so I duplicate the code for each of those
  file systems.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux