Subject: Heads up: I'm about to change the fo_ioctl 'data' to void *.
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 03/21/2003 20:43:41
I'm about to change the fo_ioctl and fo_fcntl prototypes (in file.h)
so that the 'data' argument is 'void *' instead of 'caddr_t'.

The motivation is to avoid a load load lines wrapping in a different fix.

I hope I've found everywhere they get used, the i386, sparc and sparc64
kernels build in my tree.  Userspace shouldn't be affected.

It is possible I've missed something lurking in code I don't compile.

The changed files will be:
sys/sys/file.h
sys/kern/kern_event.c
sys/kern/kern_systrace.c
sys/kern/sys_pipe.c
sys/kern/sys_socket.c
sys/sys/socketvar.h
sys/kern/vfs_vnops.c
sys/compat/svr4/svr4_filio.c
sys/compat/svr4/svr4_sockio.c
sys/compat/svr4/svr4_termios.c
sys/compat/svr4/svr4_ttold.c
sys/compat/ibcs2/ibcs2_ioctl.c
sys/compat/linux/common/linux_blkio.c
sys/compat/linux/common/linux_cdrom.c
sys/compat/linux/common/linux_fdio.c
sys/compat/linux/common/linux_hdio.c
sys/compat/linux/common/linux_socket.c
sys/compat/linux/common/linux_termios.c
sys/compat/linux/arch/i386/linux_machdep.c
sys/compat/ossaudio/ossaudio.c
sys/compat/sunos/sunos_ioctl.c
sys/dev/dmover/dmover_io.c
sys/compat/ultrix/ultrix_ioctl.c
sys/compat/svr4_32/svr4_32_filio.c
sys/compat/svr4_32/svr4_32_sockio.c
sys/compat/sunos32/sunos32_ioctl.c

The diff is a bit large, but can be found at:
http://www.btinternet.com/~david.laight/netbsd/void_fo_ioctl_fcntl.diffs

I took the opportunity to delete some (caddr_t) casts from copyin/out
call in some of the files, as well as from the ioctl/fcntl calls.

I spotted a couple of bugs in sunos32_ioctl.c:
- case _IOW('t', 101, int): the args of copyin were reversed (line 489)
- I think there are two memset() calls being done on a user address
  (about lines 879 and 904)
I've fixed the first and XXX'ed the others.

	David

-- 
David Laight: david@l8s.co.uk