diff --git a/sys/arch/x68k/stand/boot/boot.c b/sys/arch/x68k/stand/boot/boot.c index 7d649432347a..7b72b96f414a 100644 --- a/sys/arch/x68k/stand/boot/boot.c +++ b/sys/arch/x68k/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.5 2001/10/01 16:59:34 minoura Exp $ */ +/* $NetBSD: boot.c,v 1.6 2001/10/15 16:13:39 minoura Exp $ */ /* * Copyright (c) 2001 Minoura Makoto @@ -31,6 +31,7 @@ #include #include +#include #include #include "libx68k.h" @@ -45,7 +46,7 @@ #define SRAM_MEMSIZE (*((long*) 0x00ed0008)) char default_kernel[20] = "sd0a:netbsd"; -int mpu, bootdev, hostadaptor; +int mpu, hostadaptor; int console_device = -1; static void help(void); diff --git a/sys/arch/x68k/stand/boot_ufs/bootmain.c b/sys/arch/x68k/stand/boot_ufs/bootmain.c index 04acbeaecc6b..f17db64ace87 100644 --- a/sys/arch/x68k/stand/boot_ufs/bootmain.c +++ b/sys/arch/x68k/stand/boot_ufs/bootmain.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.1 2001/09/27 10:14:50 minoura Exp $ */ +/* $NetBSD: bootmain.c,v 1.2 2001/10/15 16:13:40 minoura Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -234,7 +234,7 @@ load_file_ino(ino, fn, addr, header) } /* read text and data */ - ufs_read(&dinode, (void *)addr-sizeof(struct exec), 0,/* XXX */ + ufs_read(&dinode, ((char *)addr)-sizeof(struct exec), 0,/* XXX */ header->a_text+header->a_data); /* clear out bss */ diff --git a/sys/arch/x68k/stand/libsa/fd.c b/sys/arch/x68k/stand/libsa/fd.c index 2ee8693c9eb8..187f6df37eee 100644 --- a/sys/arch/x68k/stand/libsa/fd.c +++ b/sys/arch/x68k/stand/libsa/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.1 2001/09/27 10:03:28 minoura Exp $ */ +/* $NetBSD: fd.c,v 1.2 2001/10/15 16:13:40 minoura Exp $ */ /* * Copyright (c) 2001 MINOURA Makoto. @@ -32,6 +32,10 @@ #include "fdvar.h" #include "iocs.h" +int fdopen(struct open_file *, int, int); +int fdclose(struct open_file*); +int fdstrategy(void *devdata, int rw, daddr_t blk, size_t, void*, size_t*); + int fdopen (struct open_file *f, int id, int part) diff --git a/sys/arch/x68k/stand/libsa/libx68k.h b/sys/arch/x68k/stand/libsa/libx68k.h index e03f11ddf281..efa6c80b754c 100644 --- a/sys/arch/x68k/stand/libsa/libx68k.h +++ b/sys/arch/x68k/stand/libsa/libx68k.h @@ -1,4 +1,4 @@ -/* $NetBSD: libx68k.h,v 1.2 2001/09/29 03:50:13 minoura Exp $ */ +/* $NetBSD: libx68k.h,v 1.3 2001/10/15 16:13:40 minoura Exp $ */ /* * Copyright (c) 2001 Minoura Makoto @@ -52,7 +52,7 @@ struct sd_softc; int sdstrategy(void *devdata, int rw, daddr_t blk, size_t, void*, size_t*); int sdopen(struct open_file *, ...); int sdclose(struct open_file*); -int sdgetbsdpartition(int, int); +int sd_getbsdpartition(int, int); int cdstrategy(void *devdata, int rw, daddr_t blk, size_t, void*, size_t*); int cdopen(struct open_file *, ...); int cdclose(struct open_file*); diff --git a/sys/arch/x68k/stand/libsa/sdcd.c b/sys/arch/x68k/stand/libsa/sdcd.c index 8b87c8f09f87..d056fd396a2c 100644 --- a/sys/arch/x68k/stand/libsa/sdcd.c +++ b/sys/arch/x68k/stand/libsa/sdcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sdcd.c,v 1.3 2001/10/15 16:07:20 minoura Exp $ */ +/* $NetBSD: sdcd.c,v 1.4 2001/10/15 16:13:40 minoura Exp $ */ /* * Copyright (c) 2001 MINOURA Makoto. @@ -38,6 +38,14 @@ static int current_id = -1; static int current_blklen, current_devsize, current_npart; static struct boot_partinfo partitions[MAXPARTITIONS]; +int sdopen(struct open_file *, int, int); +int sdclose(struct open_file*); +int sdstrategy(void *devdata, int rw, daddr_t blk, size_t, void*, size_t*); +int sd_getbsdpartition(int, int); +int cdopen(struct open_file *, int, int); +int cdclose(struct open_file*); +int cdstrategy(void *devdata, int rw, daddr_t blk, size_t, void*, size_t*); + static int readdisklabel(int); static int check_unit(int); @@ -279,7 +287,7 @@ sdstrategy (void *arg, int rw, daddr_t dblk, size_t size, } nblks = howmany (size, 256 << current_blklen); - if (dblk & 0x1fffff == 0x1fffff && (nblks & 0xff) == nblks) { + if ((dblk & 0x1fffff) == 0x1fffff && (nblks & 0xff) == nblks) { if (rw & F_WRITE) error = IOCS_S_WRITE (start, nblks, current_id, current_blklen, buf);