fix caddr_t fallout.

This commit is contained in:
christos 2007-03-04 10:21:25 +00:00
parent b47de51335
commit 5ebcdbe8b5
6 changed files with 22 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.15 2006/11/25 11:59:56 scw Exp $ */
/* $NetBSD: disksubr.c,v 1.16 2007/03/04 10:21:25 christos Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.15 2006/11/25 11:59:56 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.16 2007/03/04 10:21:25 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -198,7 +198,7 @@ readdisklabel(dev, strat, lp, osdep)
goto done;
}
for (dlp = (struct disklabel *)bp->b_data;
dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp <= (struct disklabel *)((char *)bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC) {
continue;
@ -385,7 +385,7 @@ writedisklabel(dev, strat, lp, osdep)
if ((error = biowait(bp)))
goto done;
for (dlp = (struct disklabel *)bp->b_data;
dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp <= (struct disklabel *)((char *)bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
if (dlp->d_magic == DISKMAGIC && dlp->d_magic2 == DISKMAGIC &&
dkcksum(dlp) == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr_mbr.c,v 1.7 2005/12/11 12:16:41 christos Exp $ */
/* $NetBSD: disksubr_mbr.c,v 1.8 2007/03/04 10:21:25 christos Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.7 2005/12/11 12:16:41 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.8 2007/03/04 10:21:25 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -127,13 +127,13 @@ mbr_label_read(dev, strat, lp, osdep, msgp, cylp, netbsd_label_offp)
struct mbr_partition *ourmbrp = NULL;
/* XXX "there has to be a better check than this." */
if (bcmp(bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) {
if (memcmp((char *)bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) {
rv = 0;
goto out;
}
/* XXX how do we check veracity/bounds of this? */
bcopy(bp->b_data + MBR_PART_OFFSET, mbrp,
memcpy(mbrp, (char *)bp->b_data + MBR_PART_OFFSET,
MBR_PART_COUNT * sizeof(*mbrp));
/* look for NetBSD partition */
@ -235,13 +235,13 @@ mbr_label_locate(dev, strat, lp, osdep, cylp, netbsd_label_offp)
goto out;
}
if (bcmp(bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) {
if (memcmp((char *)bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) {
rv = 0;
goto out;
}
/* XXX how do we check veracity/bounds of this? */
bcopy(bp->b_data + MBR_PART_OFFSET, mbrp, MBR_PART_COUNT * sizeof(*mbrp));
memcpy(mbrp, (char *)bp->b_data + MBR_PART_OFFSET, MBR_PART_COUNT * sizeof(*mbrp));
/* look for NetBSD partition */
ourmbrp = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.18 2007/03/04 05:59:37 christos Exp $ */
/* $NetBSD: mem.c,v 1.19 2007/03/04 10:21:26 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -75,7 +75,7 @@
#include "opt_compat_netbsd.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.18 2007/03/04 05:59:37 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.19 2007/03/04 10:21:26 christos Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -148,7 +148,7 @@ mmrw(dev, uio, flags)
pmap_update(pmap_kernel());
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
error = uiomove((void *)memhook + o, c, uio);
error = uiomove((char *)memhook + o, c, uio);
pmap_remove(pmap_kernel(), (vaddr_t)memhook,
(vaddr_t)memhook + PAGE_SIZE);
pmap_update(pmap_kernel());

View File

@ -1,4 +1,4 @@
/* $NetBSD: isadma_machdep.c,v 1.9 2007/03/04 06:00:42 christos Exp $ */
/* $NetBSD: isadma_machdep.c,v 1.10 2007/03/04 10:21:26 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.9 2007/03/04 06:00:42 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.10 2007/03/04 10:21:26 christos Exp $");
#define ISA_DMA_STATS
@ -564,7 +564,7 @@ _isa_bus_dmamap_sync(t, map, offset, len, ops)
minlen = len < m->m_len - moff ?
len : m->m_len - moff;
memcpy(mtod(m, void *) + moff,
memcpy(mtod(m, char *) + moff,
(char *)cookie->id_bouncebuf + offset,
minlen);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofrom.c,v 1.14 2007/03/04 06:00:42 christos Exp $ */
/* $NetBSD: ofrom.c,v 1.15 2007/03/04 10:21:26 christos Exp $ */
/*
* Copyright 1998
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.14 2007/03/04 06:00:42 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.15 2007/03/04 10:21:26 christos Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -189,7 +189,7 @@ ofromrw(dev, uio, flags)
pmap_update(pmap_kernel());
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
error = uiomove((void *)memhook + o, c, uio);
error = uiomove((char *)memhook + o, c, uio);
pmap_remove(pmap_kernel(), (vaddr_t)memhook,
(vaddr_t)memhook + PAGE_SIZE);
pmap_update(pmap_kernel());

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.20 2007/03/04 06:01:19 christos Exp $ */
/* $NetBSD: linux_machdep.c,v 1.21 2007/03/04 10:21:26 christos Exp $ */
/*-
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2007/03/04 06:01:19 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.21 2007/03/04 10:21:26 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -109,7 +109,7 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
/* Allocate space for the signal handler context. */
if (onstack)
fp = (struct linux_sigframe *)((void *)l->l_sigstk.ss_sp +
fp = (struct linux_sigframe *)((char *)l->l_sigstk.ss_sp +
l->l_sigstk.ss_size);
else
fp = (struct linux_sigframe *)tf->tf_usr_sp;