Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL

and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
This commit is contained in:
dsl 2003-03-21 23:11:19 +00:00
parent 3f2184def7
commit bd99e3429d
19 changed files with 118 additions and 125 deletions

View File

@ -1,4 +1,5 @@
/* $NetBSD: autoconf.c,v 1.66 2003/01/17 23:10:29 thorpej Exp $ */
/* $NetBSD: autoconf.c,v 1.67 2003/03/21 23:11:19 dsl Exp $ */
#define GEOM_DEBUG
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -48,7 +49,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.66 2003/01/17 23:10:29 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.67 2003/03/21 23:11:19 dsl Exp $");
#include "opt_compat_oldboot.h"
@ -225,6 +226,11 @@ matchbiosdisks()
i386_alldisks->dl_biosdisks[i].bi_cyl = big->disk[i].cyl;
i386_alldisks->dl_biosdisks[i].bi_lbasecs = big->disk[i].totsec;
i386_alldisks->dl_biosdisks[i].bi_flags = big->disk[i].flags;
#ifdef GEOM_DEBUG
printf("disk %x: flags %x, interface %x, device %llx\n",
big->disk[i].dev, big->disk[i].flags,
big->disk[i].interface_path, big->disk[i].device_path);
#endif
}
/*
@ -273,7 +279,7 @@ matchbiosdisks()
for (m = i = 0; i < big->num; i++) {
be = &big->disk[i];
#ifdef GEOM_DEBUG
printf("match %s with %d\n", dv->dv_xname, i);
printf("match %s with %d ", dv->dv_xname, i);
printf("dev ck %x bios ck %x\n", ck, be->cksum);
#endif
if (be->flags & BI_GEOM_INVALID)
@ -284,7 +290,7 @@ matchbiosdisks()
sizeof (struct mbr_partition))) {
#ifdef GEOM_DEBUG
printf("matched bios disk %x with %s\n",
be->dev, be->devname);
be->dev, dv->dv_xname);
#endif
i386_alldisks->dl_nativedisks[n].
ni_biosmatches[m++] = i;
@ -351,7 +357,7 @@ match_harddisk(dv, bid)
vput(tmpvn);
return(0);
}
error = VOP_IOCTL(tmpvn, DIOCGDINFO, (caddr_t)&label, FREAD, NOCRED, 0);
error = VOP_IOCTL(tmpvn, DIOCGDINFO, &label, FREAD, NOCRED, 0);
if (error) {
/*
* XXX can't happen - open() would

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.6 2003/03/05 23:56:06 fvdl Exp $ */
/* $NetBSD: autoconf.c,v 1.7 2003/03/21 23:11:20 dsl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -310,7 +310,7 @@ match_harddisk(dv, bid)
vput(tmpvn);
return(0);
}
error = VOP_IOCTL(tmpvn, DIOCGDINFO, (caddr_t)&label, FREAD, NOCRED, 0);
error = VOP_IOCTL(tmpvn, DIOCGDINFO, &label, FREAD, NOCRED, 0);
if (error) {
/*
* XXX can't happen - open() would

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_file.c,v 1.21 2003/01/18 07:36:57 thorpej Exp $ */
/* $NetBSD: hpux_file.c,v 1.22 2003/03/21 23:11:21 dsl Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hpux_file.c,v 1.21 2003/01/18 07:36:57 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: hpux_file.c,v 1.22 2003/03/21 23:11:21 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -300,8 +300,7 @@ hpux_sys_fcntl(l, v, retval)
vp = (struct vnode *)fp->f_data;
/* Copy in the lock structure */
error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&hfl,
sizeof (hfl));
error = copyin((caddr_t)SCARG(uap, arg), &hfl, sizeof (hfl));
if (error)
return (error);
@ -319,16 +318,16 @@ hpux_sys_fcntl(l, v, retval)
return (EBADF);
p->p_flag |= P_ADVLOCK;
return (VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg));
return (VOP_ADVLOCK(vp, p, F_SETLK, &fl, flg));
case F_WRLCK:
if ((fp->f_flag & FWRITE) == 0)
return (EBADF);
p->p_flag |= P_ADVLOCK;
return (VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg));
return (VOP_ADVLOCK(vp, p, F_SETLK, &fl, flg));
case F_UNLCK:
return (VOP_ADVLOCK(vp, (caddr_t)p, F_UNLCK, &fl,
return (VOP_ADVLOCK(vp, p, F_UNLCK, &fl,
F_POSIX));
default:
@ -343,8 +342,7 @@ hpux_sys_fcntl(l, v, retval)
vp = (struct vnode *)fp->f_data;
/* Copy in the lock structure */
error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&hfl,
sizeof (hfl));
error = copyin((caddr_t)SCARG(uap, arg), &hfl, sizeof (hfl));
if (error)
return (error);
@ -356,8 +354,7 @@ hpux_sys_fcntl(l, v, retval)
if (fl.l_whence == SEEK_CUR)
fl.l_start += fp->f_offset;
if ((error =
VOP_ADVLOCK(vp, (caddr_t)p, F_GETLK, &fl, F_POSIX)))
if ((error = VOP_ADVLOCK(vp, p, F_GETLK, &fl, F_POSIX)))
return (error);
hfl.hl_start = fl.l_start;
@ -365,7 +362,7 @@ hpux_sys_fcntl(l, v, retval)
hfl.hl_pid = fl.l_pid;
hfl.hl_type = fl.l_type;
hfl.hl_whence = fl.l_whence;
return (copyout((caddr_t)&hfl, (caddr_t)SCARG(uap, arg),
return (copyout(&hfl, (caddr_t)SCARG(uap, arg),
sizeof (hfl)));
default:
@ -597,7 +594,7 @@ bsd_to_hpux_stat(sb, hsb)
struct hpux_stat *hsb;
{
memset((caddr_t)hsb, 0, sizeof(struct hpux_stat));
memset(hsb, 0, sizeof(struct hpux_stat));
hsb->hst_dev = (long)sb->st_dev;
hsb->hst_ino = (u_long)sb->st_ino;
hsb->hst_mode = (u_short)sb->st_mode;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ccd.c,v 1.83 2003/02/25 20:35:33 thorpej Exp $ */
/* $NetBSD: ccd.c,v 1.84 2003/03/21 23:11:21 dsl Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.83 2003/02/25 20:35:33 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.84 2003/03/21 23:11:21 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -303,7 +303,7 @@ ccdinit(cs, cpaths, vpp, p)
/*
* Get partition information for the component.
*/
error = VOP_IOCTL(vpp[ix], DIOCGPART, (caddr_t)&dpart,
error = VOP_IOCTL(vpp[ix], DIOCGPART, &dpart,
FREAD, p->p_ucred, p);
if (error) {
#ifdef DEBUG
@ -1058,7 +1058,7 @@ ccdioctl(dev, cmd, data, flag, p)
vpp = malloc(ccio->ccio_ndisks * sizeof(struct vnode *),
M_DEVBUF, M_WAITOK);
error = copyin((caddr_t)ccio->ccio_disks, (caddr_t)cpp,
error = copyin(ccio->ccio_disks, cpp,
ccio->ccio_ndisks * sizeof(char **));
if (error) {
free(vpp, M_DEVBUF);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cgd.c,v 1.8 2003/02/25 20:35:34 thorpej Exp $ */
/* $NetBSD: cgd.c,v 1.9 2003/03/21 23:11:22 dsl Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.8 2003/02/25 20:35:34 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.9 2003/03/21 23:11:22 dsl Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -590,7 +590,7 @@ cgdinit(struct cgd_softc *cs, char *cpath, struct vnode *vp,
cs->sc_tdev = va.va_rdev;
ret = VOP_IOCTL(vp, DIOCGPART, (caddr_t)&dpart, FREAD, p->p_ucred, p);
ret = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, p->p_ucred, p);
if (ret)
goto bail;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_copyback.c,v 1.22 2002/11/16 16:49:46 oster Exp $ */
/* $NetBSD: rf_copyback.c,v 1.23 2003/03/21 23:11:22 dsl Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -38,7 +38,7 @@
****************************************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.22 2002/11/16 16:49:46 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.23 2003/03/21 23:11:22 dsl Exp $");
#include <dev/raidframe/raidframevar.h>
@ -162,7 +162,7 @@ rf_CopybackReconstructedData(raidPtr)
if ((retcode = VOP_GETATTR(vp, &va, proc->p_ucred, proc)) != 0) {
return;
}
retcode = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart,
retcode = VOP_IOCTL(vp, DIOCGPART, &dpart,
FREAD, proc->p_ucred, proc);
if (retcode) {
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_disks.c,v 1.40 2002/10/22 03:15:28 oster Exp $ */
/* $NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@ -67,7 +67,7 @@
***************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.40 2002/10/22 03:15:28 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $");
#include <dev/raidframe/raidframevar.h>
@ -646,7 +646,7 @@ rf_ConfigureDisk(raidPtr, buf, diskPtr, row, col)
if ((error = VOP_GETATTR(vp, &va, proc->p_ucred, proc)) != 0) {
return (error);
}
error = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart,
error = VOP_IOCTL(vp, DIOCGPART, &dpart,
FREAD, proc->p_ucred, proc);
if (error) {
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_netbsdkintf.c,v 1.155 2003/02/25 20:35:36 thorpej Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.156 2003/03/21 23:11:23 dsl Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@ -111,7 +111,7 @@
***********************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.155 2003/02/25 20:35:36 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.156 2003/03/21 23:11:23 dsl Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@ -885,8 +885,7 @@ raidioctl(dev, cmd, data, flag, p)
if (k_cfg == NULL) {
return (ENOMEM);
}
retcode = copyin((caddr_t) u_cfg, (caddr_t) k_cfg,
sizeof(RF_Config_t));
retcode = copyin(u_cfg, k_cfg, sizeof(RF_Config_t));
if (retcode) {
RF_Free(k_cfg, sizeof(RF_Config_t));
db1_printf(("rf_ioctl: retcode=%d copyin.1\n",
@ -907,8 +906,7 @@ raidioctl(dev, cmd, data, flag, p)
RF_Free(k_cfg, sizeof(RF_Config_t));
return (ENOMEM);
}
retcode = copyin(k_cfg->layoutSpecific,
(caddr_t) specific_buf,
retcode = copyin(k_cfg->layoutSpecific, specific_buf,
k_cfg->layoutSpecificSize);
if (retcode) {
RF_Free(k_cfg, sizeof(RF_Config_t));
@ -1021,10 +1019,9 @@ raidioctl(dev, cmd, data, flag, p)
raidPtr->raid_cinfo[row][column].ci_vp,
clabel );
retcode = copyout((caddr_t) clabel,
(caddr_t) *clabel_ptr,
retcode = copyout(clabel, *clabel_ptr,
sizeof(RF_ComponentLabel_t));
RF_Free( clabel, sizeof(RF_ComponentLabel_t));
RF_Free(clabel, sizeof(RF_ComponentLabel_t));
return (retcode);
case RAIDFRAME_SET_COMPONENT_LABEL:
@ -1252,8 +1249,7 @@ raidioctl(dev, cmd, data, flag, p)
for (j = d_cfg->cols, i = 0; i < d_cfg->nspares; i++, j++) {
d_cfg->spares[i] = raidPtr->Disks[0][j];
}
retcode = copyout((caddr_t) d_cfg, (caddr_t) * ucfgp,
sizeof(RF_DeviceConfig_t));
retcode = copyout(d_cfg, *ucfgp, sizeof(RF_DeviceConfig_t));
RF_Free(d_cfg, sizeof(RF_DeviceConfig_t));
return (retcode);
@ -1370,8 +1366,7 @@ raidioctl(dev, cmd, data, flag, p)
progressInfo.remaining = progressInfo.total -
progressInfo.completed;
}
retcode = copyout((caddr_t) &progressInfo,
(caddr_t) *progressInfoPtr,
retcode = copyout(&progressInfo, *progressInfoPtr,
sizeof(RF_ProgressInfo_t));
return (retcode);
@ -1404,8 +1399,7 @@ raidioctl(dev, cmd, data, flag, p)
progressInfo.completed = 100;
progressInfo.total = 100;
}
retcode = copyout((caddr_t) &progressInfo,
(caddr_t) *progressInfoPtr,
retcode = copyout(&progressInfo, *progressInfoPtr,
sizeof(RF_ProgressInfo_t));
return (retcode);
@ -1436,8 +1430,7 @@ raidioctl(dev, cmd, data, flag, p)
progressInfo.completed = 100;
progressInfo.total = 100;
}
retcode = copyout((caddr_t) &progressInfo,
(caddr_t) *progressInfoPtr,
retcode = copyout(&progressInfo, *progressInfoPtr,
sizeof(RF_ProgressInfo_t));
return (retcode);
@ -2726,8 +2719,7 @@ rf_find_raid_components()
}
/* Ok, the disk exists. Go get the disklabel. */
error = VOP_IOCTL(vp, DIOCGDINFO, (caddr_t)&label,
FREAD, NOCRED, 0);
error = VOP_IOCTL(vp, DIOCGDINFO, &label, FREAD, NOCRED, 0);
if (error) {
/*
* XXX can't happen - open() would

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_reconstruct.c,v 1.52 2003/02/09 10:04:34 jdolecek Exp $ */
/* $NetBSD: rf_reconstruct.c,v 1.53 2003/03/21 23:11:23 dsl Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.52 2003/02/09 10:04:34 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.53 2003/03/21 23:11:23 dsl Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@ -508,7 +508,7 @@ rf_ReconstructInPlace(raidPtr, row, col)
RF_UNLOCK_MUTEX(raidPtr->mutex);
return(retcode);
}
retcode = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart,
retcode = VOP_IOCTL(vp, DIOCGPART, &dpart,
FREAD, proc->p_ucred, proc);
if (retcode) {
RF_LOCK_MUTEX(raidPtr->mutex);

View File

@ -1,4 +1,4 @@
/* $NetBSD: advfsops.c,v 1.2 2003/02/01 06:23:40 thorpej Exp $ */
/* $NetBSD: advfsops.c,v 1.3 2003/03/21 23:11:24 dsl Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.2 2003/02/01 06:23:40 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.3 2003/03/21 23:11:24 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -118,7 +118,7 @@ adosfs_mount(mp, path, data, ndp, p)
vfs_showexport(mp, &args.export, &amp->export);
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof(struct adosfs_args));
error = copyin(data, &args, sizeof(struct adosfs_args));
if (error)
return(error);
@ -217,7 +217,7 @@ adosfs_mountfs(devvp, mp, p)
*/
if ((error = VOP_OPEN(devvp, FREAD, NOCRED, p)) != 0)
return (error);
error = VOP_IOCTL(devvp, DIOCGDINFO,(caddr_t)&dl, FREAD, NOCRED, p);
error = VOP_IOCTL(devvp, DIOCGDINFO, &dl, FREAD, NOCRED, p);
if (error)
goto fail;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_vfsops.c,v 1.2 2003/02/01 06:23:41 thorpej Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.3 2003/03/21 23:11:25 dsl Exp $ */
/*-
* Copyright (c) 1994
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.2 2003/02/01 06:23:41 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.3 2003/03/21 23:11:25 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -190,7 +190,7 @@ cd9660_mount(mp, path, data, ndp, p)
vfs_showexport(mp, &args.export, &imp->im_export);
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof (struct iso_args));
error = copyin(data, &args, sizeof (struct iso_args));
if (error)
return (error);
@ -350,15 +350,14 @@ iso_mountfs(devvp, mp, p, argp)
*/
iso_bsize = ISO_DEFAULT_BLOCK_SIZE;
error = VOP_IOCTL(devvp, DIOCGDINFO, (caddr_t)&label, FREAD, FSCRED, p);
error = VOP_IOCTL(devvp, DIOCGDINFO, &label, FREAD, FSCRED, p);
if (!error &&
label.d_partitions[DISKPART(dev)].p_fstype == FS_ISO9660) {
/* XXX more sanity checks? */
sess = label.d_partitions[DISKPART(dev)].p_cdsession;
} else {
/* fallback to old method */
error = VOP_IOCTL(devvp, CDIOREADMSADDR, (caddr_t)&sess, 0,
FSCRED, p);
error = VOP_IOCTL(devvp, CDIOREADMSADDR, &sess, 0, FSCRED, p);
if (error)
sess = 0; /* never mind */
}
@ -414,7 +413,7 @@ iso_mountfs(devvp, mp, p, argp)
}
isomp = malloc(sizeof *isomp, M_ISOFSMNT, M_WAITOK);
memset((caddr_t)isomp, 0, sizeof *isomp);
memset(isomp, 0, sizeof *isomp);
if (iso_makemp(isomp, pribp, &ext_attr_length) == -1) {
error = EINVAL;
goto out;
@ -521,7 +520,7 @@ out:
VOP_UNLOCK(devvp, 0);
}
if (isomp) {
free((caddr_t)isomp, M_ISOFSMNT);
free(isomp, M_ISOFSMNT);
mp->mnt_data = NULL;
}
return error;
@ -576,7 +575,7 @@ cd9660_unmount(mp, mntflags, p)
vn_lock(isomp->im_devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
vput(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT);
free(isomp, M_ISOFSMNT);
mp->mnt_data = NULL;
mp->mnt_flag &= ~MNT_LOCAL;
return (error);
@ -792,7 +791,7 @@ cd9660_vget_internal(mp, ino, vpp, relocated, isodir)
return (error);
}
ip = pool_get(&cd9660_node_pool, PR_WAITOK);
memset((caddr_t)ip, 0, sizeof(struct iso_node));
memset(ip, 0, sizeof(struct iso_node));
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_dev = dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vfsops.c,v 1.2 2003/02/01 06:23:41 thorpej Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.3 2003/03/21 23:11:25 dsl Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.2 2003/02/01 06:23:41 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.3 2003/03/21 23:11:25 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@ -261,7 +261,7 @@ msdosfs_mount(mp, path, data, ndp, p)
vfs_showexport(mp, &args.export, &pmp->pm_export);
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof(struct msdosfs_args));
error = copyin(data, &args, sizeof(struct msdosfs_args));
if (error)
return (error);
/*
@ -430,8 +430,7 @@ msdosfs_mountfs(devvp, mp, p, argp)
* that the size of a disk block will always be 512 bytes.
* Let's check it...
*/
error = VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart,
FREAD, NOCRED, p);
error = VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, p);
if (error)
goto error_exit;
tmp = dpart.part->p_fstype;
@ -464,7 +463,7 @@ msdosfs_mountfs(devvp, mp, p, argp)
}
pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_WAITOK);
memset((caddr_t)pmp, 0, sizeof *pmp);
memset(pmp, 0, sizeof *pmp);
pmp->pm_mountp = mp;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls.c,v 1.183 2003/02/23 14:37:34 pk Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.184 2003/03/21 23:11:25 dsl Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.183 2003/02/23 14:37:34 pk Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.184 2003/03/21 23:11:25 dsl Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_43.h"
@ -356,7 +356,7 @@ update:
vp->v_mountedhere = (struct mount *)0;
vfs->vfs_refcount--;
vfs_unbusy(mp);
free((caddr_t)mp, M_MOUNT);
free(mp, M_MOUNT);
vput(vp);
}
return (error);
@ -535,7 +535,7 @@ dounmount(mp, flags, p)
if (used_syncer)
lockmgr(&syncer_lock, LK_RELEASE, NULL);
while (mp->mnt_wcnt > 0) {
wakeup((caddr_t)mp);
wakeup(mp);
tsleep(&mp->mnt_wcnt, PVFS, "mntwcnt1", 0);
}
return (error);
@ -553,10 +553,10 @@ dounmount(mp, flags, p)
if (used_syncer)
lockmgr(&syncer_lock, LK_RELEASE, NULL);
while(mp->mnt_wcnt > 0) {
wakeup((caddr_t)mp);
wakeup(mp);
tsleep(&mp->mnt_wcnt, PVFS, "mntwcnt2", 0);
}
free((caddr_t)mp, M_MOUNT);
free(mp, M_MOUNT);
return (0);
}
@ -1051,7 +1051,7 @@ sys_open(l, v, retval)
fp->f_flag = flags & FMASK;
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
fp->f_data = (caddr_t)vp;
fp->f_data = vp;
if (flags & (O_EXLOCK | O_SHLOCK)) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
@ -1064,7 +1064,7 @@ sys_open(l, v, retval)
if ((flags & FNONBLOCK) == 0)
type |= F_WAIT;
VOP_UNLOCK(vp, 0);
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
error = VOP_ADVLOCK(vp, fp, F_SETLK, &lf, type);
if (error) {
(void) vn_close(vp, fp->f_flag, fp->f_cred, p);
FILE_UNUSE(fp, p);
@ -1113,13 +1113,13 @@ sys_getfh(l, v, retval)
if (error)
return (error);
vp = nd.ni_vp;
memset((caddr_t)&fh, 0, sizeof(fh));
memset(&fh, 0, sizeof(fh));
fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fh.fh_fid);
vput(vp);
if (error)
return (error);
error = copyout((caddr_t)&fh, (caddr_t)SCARG(uap, fhp), sizeof (fh));
error = copyout(&fh, (caddr_t)SCARG(uap, fhp), sizeof (fh));
return (error);
}
@ -1223,7 +1223,7 @@ sys_fhopen(l, v, retval)
fp->f_flag = flags & FMASK;
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
fp->f_data = (caddr_t)vp;
fp->f_data = vp;
if (flags & (O_EXLOCK | O_SHLOCK)) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
@ -1236,7 +1236,7 @@ sys_fhopen(l, v, retval)
if ((flags & FNONBLOCK) == 0)
type |= F_WAIT;
VOP_UNLOCK(vp, 0);
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
error = VOP_ADVLOCK(vp, fp, F_SETLK, &lf, type);
if (error) {
(void) vn_close(vp, fp->f_flag, fp->f_cred, p);
FILE_UNUSE(fp, p);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_vnops.c,v 1.67 2003/03/21 21:13:52 dsl Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.68 2003/03/21 23:11:27 dsl Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.67 2003/03/21 21:13:52 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.68 2003/03/21 23:11:27 dsl Exp $");
#include "fs_union.h"
@ -461,7 +461,7 @@ unionread:
struct vnode *tvp = vp;
vp = vp->v_mount->mnt_vnodecovered;
VREF(vp);
fp->f_data = (caddr_t) vp;
fp->f_data = vp;
fp->f_offset = 0;
vrele(tvp);
goto unionread;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode_if.c,v 1.40 2002/10/23 09:16:46 jdolecek Exp $ */
/* $NetBSD: vnode_if.c,v 1.41 2003/03/21 23:11:27 dsl Exp $ */
/*
* Warning: This file is generated automatically.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.40 2002/10/23 09:16:46 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.41 2003/03/21 23:11:27 dsl Exp $");
/*
@ -479,7 +479,7 @@ int
VOP_IOCTL(vp, command, data, fflag, cred, p)
struct vnode *vp;
u_long command;
caddr_t data;
void *data;
int fflag;
struct ucred *cred;
struct proc *p;
@ -516,7 +516,7 @@ int
VOP_FCNTL(vp, command, data, fflag, cred, p)
struct vnode *vp;
u_int command;
caddr_t data;
void *data;
int fflag;
struct ucred *cred;
struct proc *p;
@ -1281,7 +1281,7 @@ const struct vnodeop_desc vop_advlock_desc = {
int
VOP_ADVLOCK(vp, id, op, fl, flags)
struct vnode *vp;
caddr_t id;
void *id;
int op;
struct flock *fl;
int flags;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode_if.h,v 1.39 2002/10/23 09:16:48 jdolecek Exp $ */
/* $NetBSD: vnode_if.h,v 1.40 2003/03/21 23:11:28 dsl Exp $ */
/*
* Warning: This file is generated automatically.
@ -391,7 +391,7 @@ struct vop_ioctl_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
u_long a_command;
caddr_t a_data;
void *a_data;
int a_fflag;
struct ucred *a_cred;
struct proc *a_p;
@ -400,7 +400,7 @@ extern const struct vnodeop_desc vop_ioctl_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
int VOP_IOCTL(struct vnode *, u_long, caddr_t, int, struct ucred *,
int VOP_IOCTL(struct vnode *, u_long, void *, int, struct ucred *,
struct proc *)
#ifndef VNODE_OP_NOINLINE
__attribute__((__unused__))
@ -410,7 +410,7 @@ __attribute__((__unused__))
static __inline int VOP_IOCTL(vp, command, data, fflag, cred, p)
struct vnode *vp;
u_long command;
caddr_t data;
void *data;
int fflag;
struct ucred *cred;
struct proc *p;
@ -431,7 +431,7 @@ struct vop_fcntl_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
u_int a_command;
caddr_t a_data;
void *a_data;
int a_fflag;
struct ucred *a_cred;
struct proc *a_p;
@ -440,7 +440,7 @@ extern const struct vnodeop_desc vop_fcntl_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
int VOP_FCNTL(struct vnode *, u_int, caddr_t, int, struct ucred *,
int VOP_FCNTL(struct vnode *, u_int, void *, int, struct ucred *,
struct proc *)
#ifndef VNODE_OP_NOINLINE
__attribute__((__unused__))
@ -450,7 +450,7 @@ __attribute__((__unused__))
static __inline int VOP_FCNTL(vp, command, data, fflag, cred, p)
struct vnode *vp;
u_int command;
caddr_t data;
void *data;
int fflag;
struct ucred *cred;
struct proc *p;
@ -1180,7 +1180,7 @@ static __inline int VOP_PATHCONF(vp, name, retval)
struct vop_advlock_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
caddr_t a_id;
void *a_id;
int a_op;
struct flock *a_fl;
int a_flags;
@ -1189,7 +1189,7 @@ extern const struct vnodeop_desc vop_advlock_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
int VOP_ADVLOCK(struct vnode *, caddr_t, int, struct flock *, int)
int VOP_ADVLOCK(struct vnode *, void *, int, struct flock *, int)
#ifndef VNODE_OP_NOINLINE
__attribute__((__unused__))
#endif
@ -1197,7 +1197,7 @@ __attribute__((__unused__))
#ifndef VNODE_OP_NOINLINE
static __inline int VOP_ADVLOCK(vp, id, op, fl, flags)
struct vnode *vp;
caddr_t id;
void *id;
int op;
struct flock *fl;
int flags;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_vfsops.c,v 1.53 2003/01/24 21:55:20 fvdl Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.54 2003/03/21 23:11:28 dsl Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.53 2003/01/24 21:55:20 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.54 2003/03/21 23:11:28 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -234,7 +234,7 @@ ext2fs_mount(mp, path, data, ndp, p)
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args));
error = copyin(data, &args, sizeof (struct ufs_args));
if (error)
return (error);
/*
@ -406,7 +406,7 @@ ext2fs_reload(mountp, cred, p)
/*
* Step 2: re-read superblock from disk.
*/
if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0)
if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, p) != 0)
size = DEV_BSIZE;
else
size = dpart.disklab->d_secsize;
@ -543,7 +543,7 @@ ext2fs_mountfs(devvp, mp, p)
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
if (error)
return (error);
if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) != 0)
if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) != 0)
size = DEV_BSIZE;
else
size = dpart.disklab->d_secsize;
@ -563,9 +563,9 @@ ext2fs_mountfs(devvp, mp, p)
if (error)
goto out;
ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
memset((caddr_t)ump, 0, sizeof *ump);
memset(ump, 0, sizeof *ump);
ump->um_e2fs = malloc(sizeof(struct m_ext2fs), M_UFSMNT, M_WAITOK);
memset((caddr_t)ump->um_e2fs, 0, sizeof(struct m_ext2fs));
memset(ump->um_e2fs, 0, sizeof(struct m_ext2fs));
e2fs_sbload((struct ext2fs*)bp->b_data, &ump->um_e2fs->e2fs);
brelse(bp);
bp = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.107 2003/02/17 23:48:14 perseant Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.108 2003/03/21 23:11:29 dsl Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.107 2003/02/17 23:48:14 perseant Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.108 2003/03/21 23:11:29 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -198,7 +198,7 @@ ffs_mount(mp, path, data, ndp, p)
vfs_showexport(mp, &args.export, &ump->um_export);
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args));
error = copyin(data, &args, sizeof (struct ufs_args));
if (error)
return (error);
@ -469,7 +469,7 @@ ffs_reload(mountp, cred, p)
/*
* Step 2: re-read superblock from disk.
*/
if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, NOCRED, p) != 0)
if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, p) != 0)
size = DEV_BSIZE;
else
size = dpart.disklab->d_secsize;
@ -513,7 +513,7 @@ ffs_reload(mountp, cred, p)
/* First check to see if this is tagged as an Apple UFS filesystem
* in the disklabel
*/
if ((VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) == 0) &&
if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) == 0) &&
(dpart.part->p_fstype == FS_APPLEUFS)) {
VFSTOUFS(mountp)->um_flags |= UFS_ISAPPLEUFS;
}
@ -692,7 +692,7 @@ ffs_mountfs(devvp, mp, p)
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
if (error)
return (error);
if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) != 0)
if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) != 0)
size = DEV_BSIZE;
else
size = dpart.disklab->d_secsize;
@ -754,7 +754,7 @@ ffs_mountfs(devvp, mp, p)
}
ump = malloc(sizeof *ump, M_UFSMNT, M_WAITOK);
memset((caddr_t)ump, 0, sizeof *ump);
memset(ump, 0, sizeof *ump);
ump->um_fs = fs;
if (fs->fs_sbsize < SBSIZE)
bp->b_flags |= B_INVAL;
@ -764,7 +764,7 @@ ffs_mountfs(devvp, mp, p)
/* First check to see if this is tagged as an Apple UFS filesystem
* in the disklabel
*/
if ((VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) == 0) &&
if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) == 0) &&
(dpart.part->p_fstype == FS_APPLEUFS)) {
ump->um_flags |= UFS_ISAPPLEUFS;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_vfsops.c,v 1.110 2003/03/21 06:26:37 perseant Exp $ */
/* $NetBSD: lfs_vfsops.c,v 1.111 2003/03/21 23:11:30 dsl Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.110 2003/03/21 06:26:37 perseant Exp $");
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.111 2003/03/21 23:11:30 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@ -344,7 +344,7 @@ lfs_mount(struct mount *mp, const char *path, void *data, struct nameidata *ndp,
vfs_showexport(mp, &args.export, &ump->um_export);
return copyout(&args, data, sizeof(args));
}
error = copyin(data, (caddr_t)&args, sizeof (struct ufs_args));
error = copyin(data, &args, sizeof (struct ufs_args));
if (error)
return (error);
@ -916,7 +916,7 @@ lfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
if (error)
return (error);
if (VOP_IOCTL(devvp, DIOCGPART, (caddr_t)&dpart, FREAD, cred, p) != 0)
if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) != 0)
secsize = DEV_BSIZE;
else
secsize = dpart.disklab->d_secsize;
@ -1957,7 +1957,7 @@ lfs_gop_write(struct vnode *vp, struct vm_page **pgs, int npages, int flags)
}
VOP_BWRITE(bp);
while (lfs_gatherblock(sp, bp, NULL))
;
continue;
}
if (skipbytes) {