Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/playstation2/playstation2 Adapt to struct buf changes
details: https://anonhg.NetBSD.org/src/rev/da8cdc5755aa
branches: trunk
changeset: 330307:da8cdc5755aa
user: martin <martin%NetBSD.org@localhost>
date: Fri Jul 04 08:51:15 2014 +0000
description:
Adapt to struct buf changes
diffstat:
sys/arch/playstation2/playstation2/disksubr.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (51 lines):
diff -r c3922607c832 -r da8cdc5755aa sys/arch/playstation2/playstation2/disksubr.c
--- a/sys/arch/playstation2/playstation2/disksubr.c Fri Jul 04 08:33:08 2014 +0000
+++ b/sys/arch/playstation2/playstation2/disksubr.c Fri Jul 04 08:51:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.18 2014/03/31 11:25:49 martin Exp $ */
+/* $NetBSD: disksubr.c,v 1.19 2014/07/04 08:51:15 martin Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.18 2014/03/31 11:25:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.19 2014/07/04 08:51:15 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -57,12 +57,12 @@
int i;
/* Note: Magic number is little-endian. */
- mbrmagicp = (u_int16_t *)(bp->b_data + MBR_MAGIC_OFFSET);
+ mbrmagicp = (u_int16_t *)((char*)bp->b_data + MBR_MAGIC_OFFSET);
if (*mbrmagicp != MBR_MAGIC)
return (NO_MBR_SIGNATURE);
/* XXX how do we check veracity/bounds of this? */
- memcpy(dp, bp->b_data + MBR_PART_OFFSET, MBR_PART_COUNT * sizeof(*dp));
+ memcpy(dp, (char*)bp->b_data + MBR_PART_OFFSET, MBR_PART_COUNT * sizeof(*dp));
/* look for NetBSD partition */
for (i = 0; i < MBR_PART_COUNT; i++) {
@@ -198,7 +198,7 @@
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) {
if (msg == NULL)
@@ -371,7 +371,7 @@
if ((error = biowait(bp)) != 0)
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) {
Home |
Main Index |
Thread Index |
Old Index