Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/installboot convert from "sun68k_bbinfo.h" to <dev/...



details:   https://anonhg.NetBSD.org/src/rev/ea3e9af27428
branches:  trunk
changeset: 526043:ea3e9af27428
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Apr 24 01:35:25 2002 +0000

description:
convert from "sun68k_bbinfo.h" to <dev/sun/sun_boot.h>

diffstat:

 usr.sbin/installboot/Makefile      |  12 +-----------
 usr.sbin/installboot/arch/sun68k.c |  18 ++++++++----------
 2 files changed, 9 insertions(+), 21 deletions(-)

diffs (87 lines):

diff -r 4207e1a17081 -r ea3e9af27428 usr.sbin/installboot/Makefile
--- a/usr.sbin/installboot/Makefile     Wed Apr 24 01:33:55 2002 +0000
+++ b/usr.sbin/installboot/Makefile     Wed Apr 24 01:35:25 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.15 2002/04/23 02:39:33 lukem Exp $
+#      $NetBSD: Makefile,v 1.16 2002/04/24 01:35:25 lukem Exp $
 #
 
 .include <bsd.own.mk>
@@ -15,16 +15,6 @@
 CPPFLAGS+=     -I${.CURDIR} -I.
 .PATH:         ${.CURDIR}/arch ${UFSSRC}/ffs
 
-
-sun68k.c:      sun68k_bbinfo.h
-
-sun68k_bbinfo.h: ${_SRC_TOP_}/sys/arch/sun68k/stand/libsa/bbinfo.h
-       @echo "Copying ${.ALLSRC} to ${.TARGET}"
-       @cp ${.ALLSRC} ${.TARGET}
-
-CLEANFILES+=   sun68k_bbinfo.h
-
-
 .ifndef HOSTPROG
 .include <bsd.prog.mk>
 .endif
diff -r 4207e1a17081 -r ea3e9af27428 usr.sbin/installboot/arch/sun68k.c
--- a/usr.sbin/installboot/arch/sun68k.c        Wed Apr 24 01:33:55 2002 +0000
+++ b/usr.sbin/installboot/arch/sun68k.c        Wed Apr 24 01:35:25 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun68k.c,v 1.3 2002/04/22 23:24:10 bjh21 Exp $ */
+/*     $NetBSD: sun68k.c,v 1.4 2002/04/24 01:35:25 lukem Exp $ */
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: sun68k.c,v 1.3 2002/04/22 23:24:10 bjh21 Exp $");
+__RCSID("$NetBSD: sun68k.c,v 1.4 2002/04/24 01:35:25 lukem Exp $");
 #endif /* !__lint */
 
 #include <sys/param.h>
@@ -52,12 +52,9 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "installboot.h"
-#include "sun68k_bbinfo.h"
+#include <dev/sun/sun_boot.h>
 
-#define SUN68K_BOOT_BLOCK_OFFSET       DEV_BSIZE
-#define SUN68K_BOOT_BLOCK_BLOCKSIZE    DEV_BSIZE
-#define SUN68K_BOOT_BLOCK_MAX_SIZE     (DEV_BSIZE * 15)
+#include "installboot.h"
 
 int
 sun68k_clearboot(ib_params *params)
@@ -113,7 +110,7 @@
        int             retval;
        ssize_t         rv;
        size_t          bbi;
-       struct bbinfo   *bbinfop;       /* bbinfo in prototype image */
+       struct sun68k_bbinfo    *bbinfop;       /* bbinfo in prototype image */
        uint32_t        maxblk, nblk, blk_i;
        ib_block        *blocks = NULL;
 
@@ -123,6 +120,7 @@
        assert(params->fstype != NULL);
        assert(params->s1fd != -1);
        assert(params->stage1 != NULL);
+       assert(SUN68K_BBINFO_MAGICSIZE == 32);
 
        if (params->stage2 == NULL) {
                warnx("You must provide a secondary bootstrap");
@@ -165,8 +163,8 @@
        /* Look for the bbinfo structure. */
        for (bbi = 0; bbi < sizeof(bb); bbi += sizeof(uint32_t)) {
                bbinfop = (void *) (bb + bbi);
-               if (memcmp(bbinfop->bbi_magic, BBINFO_MAGIC,
-                           BBINFO_MAGICSIZE) == 0)
+               if (memcmp(bbinfop->bbi_magic, SUN68K_BBINFO_MAGIC,
+                           SUN68K_BBINFO_MAGICSIZE) == 0)
                        break;
        }
        if (bbi >= sizeof(bb)) {



Home | Main Index | Thread Index | Old Index