diff options
Diffstat (limited to 'sys/arch/mvme68k/stand')
-rw-r--r-- | sys/arch/mvme68k/stand/installboot/installboot.c | 18 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/bugdev.c | 8 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/prtvid/prtvid.c | 16 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/wrtvid/wrtvid.c | 17 |
4 files changed, 30 insertions, 29 deletions
diff --git a/sys/arch/mvme68k/stand/installboot/installboot.c b/sys/arch/mvme68k/stand/installboot/installboot.c index 3db8a4edc0e..d62ea70b554 100644 --- a/sys/arch/mvme68k/stand/installboot/installboot.c +++ b/sys/arch/mvme68k/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.10 2003/08/25 23:36:46 tedu Exp $ */ +/* $OpenBSD: installboot.c,v 1.11 2007/06/17 00:28:56 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -35,6 +35,7 @@ #include <sys/mount.h> #include <sys/time.h> #include <sys/stat.h> +#include <sys/disklabel.h> #include <ufs/ufs/dinode.h> #include <ufs/ufs/dir.h> #include <ufs/ffs/fs.h> @@ -47,7 +48,6 @@ #include <string.h> #include <unistd.h> #include <util.h> -#include <machine/disklabel.h> int verbose, nowrite, hflag; char *boot, *proto, *dev; @@ -385,14 +385,14 @@ vid_to_disklabel(char *dkname, char *bootproto) { char *specname; int exe_file, f; - struct cpu_disklabel *pcpul; + struct mvmedisklabel *pcpul; struct stat stat; unsigned int exe_addr; unsigned short exe_addr_u; unsigned short exe_addr_l; - pcpul = (struct cpu_disklabel *)malloc(sizeof(struct cpu_disklabel)); - bzero(pcpul, sizeof(struct cpu_disklabel)); + pcpul = (struct mvmedisklabel *)malloc(sizeof(struct mvmedisklabel)); + bzero(pcpul, sizeof(struct mvmedisklabel)); if (verbose) printf("modifying vid.\n"); @@ -406,8 +406,8 @@ vid_to_disklabel(char *dkname, char *bootproto) f = opendev(dkname, O_RDWR, OPENDEV_PART, &specname); if (lseek(f, 0, SEEK_SET) < 0 || - read(f, pcpul, sizeof(struct cpu_disklabel)) < - sizeof(struct cpu_disklabel)) + read(f, pcpul, sizeof(struct mvmedisklabel)) < + sizeof(struct mvmedisklabel)) err(4, "%s", specname); @@ -452,8 +452,8 @@ vid_to_disklabel(char *dkname, char *bootproto) if (!nowrite) { if (lseek(f, 0, SEEK_SET) < 0 || - write(f, pcpul, sizeof(struct cpu_disklabel)) < - sizeof(struct cpu_disklabel)) + write(f, pcpul, sizeof(struct mvmedisklabel)) < + sizeof(struct mvmedisklabel)) err(4, "%s", specname); } free(pcpul); diff --git a/sys/arch/mvme68k/stand/libsa/bugdev.c b/sys/arch/mvme68k/stand/libsa/bugdev.c index 581a39836f5..aa9aaec8d17 100644 --- a/sys/arch/mvme68k/stand/libsa/bugdev.c +++ b/sys/arch/mvme68k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.3 2003/08/20 00:26:00 deraadt Exp $ */ +/* $OpenBSD: bugdev.c,v 1.4 2007/06/17 00:28:56 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -37,7 +37,7 @@ #include "stand.h" #include "libsa.h" -void cputobsdlabel(struct disklabel *lp, struct cpu_disklabel *clp); +void cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp); int errno; @@ -82,7 +82,7 @@ devopen(struct open_file *f, const char *fname, char **file) if (i != DEV_BSIZE) return (EINVAL); - cputobsdlabel(&sdlabel, (struct cpu_disklabel *)iobuf); + cputobsdlabel(&sdlabel, (struct mvmedisklabel *)iobuf); pp->poff = sdlabel.d_partitions[pn].p_offset; pp->psize = sdlabel.d_partitions[pn].p_size; @@ -160,7 +160,7 @@ bugscioctl(struct open_file *f, u_long cmd, void *data) } void -cputobsdlabel(struct disklabel *lp, struct cpu_disklabel *clp) +cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) { int i; diff --git a/sys/arch/mvme68k/stand/prtvid/prtvid.c b/sys/arch/mvme68k/stand/prtvid/prtvid.c index 61d6cd2e808..640803c738d 100644 --- a/sys/arch/mvme68k/stand/prtvid/prtvid.c +++ b/sys/arch/mvme68k/stand/prtvid/prtvid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prtvid.c,v 1.6 2004/12/27 15:23:45 drahn Exp $ */ +/* $OpenBSD: prtvid.c,v 1.7 2007/06/17 00:28:56 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn <drahn@openbsd.org> @@ -16,13 +16,15 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/types.h> +#include <sys/disklabel.h> + #include <stdio.h> #define __DBINTERFACE_PRIVATE #include <db.h> -#include <machine/disklabel.h> static void -swabvid(struct cpu_disklabel *cdl) +swabvid(struct mvmedisklabel *cdl) { M_32_SWAP(cdl->vid_oss); M_16_SWAP(cdl->vid_osl); @@ -32,7 +34,7 @@ swabvid(struct cpu_disklabel *cdl) } static void -swabcfg(struct cpu_disklabel *cdl) +swabcfg(struct mvmedisklabel *cdl) { printf("swapping cfg\n"); @@ -56,11 +58,11 @@ swabcfg(struct cpu_disklabel *cdl) int main(int argc, char *argv[]) { - struct cpu_disklabel *cdl; + struct mvmedisklabel *cdl; - cdl = (struct cpu_disklabel *) malloc(sizeof (struct cpu_disklabel)); + cdl = (struct mvmedisklabel *) malloc(sizeof (struct mvmedisklabel)); - fread(cdl, sizeof(struct cpu_disklabel), 1, stdin); + fread(cdl, sizeof(struct mvmedisklabel), 1, stdin); if (BYTE_ORDER != BIG_ENDIAN) swabvid(cdl); diff --git a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c index 63c0aa12e26..d187203e4ba 100644 --- a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c +++ b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wrtvid.c,v 1.6 2004/12/27 15:23:46 drahn Exp $ */ +/* $OpenBSD: wrtvid.c,v 1.7 2007/06/17 00:28:56 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn <drahn@openbsd.org> @@ -18,13 +18,12 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/disklabel.h> #include <fcntl.h> #include <unistd.h> #include <stdio.h> #define __DBINTERFACE_PRIVATE #include <db.h> -#include <machine/disklabel.h> - #define BUF_SIZ 512 static void @@ -43,7 +42,7 @@ copy_exe(int exe_file, int tape_exe) } static void -swabvid(struct cpu_disklabel *pcpul) +swabvid(struct mvmedisklabel *pcpul) { M_32_SWAP(pcpul->vid_oss); M_16_SWAP(pcpul->vid_osl); @@ -55,7 +54,7 @@ swabvid(struct cpu_disklabel *pcpul) } static void -swabcfg(struct cpu_disklabel *pcpul) +swabcfg(struct mvmedisklabel *pcpul) { M_16_SWAP(pcpul->cfg_atm); M_16_SWAP(pcpul->cfg_prm); @@ -77,7 +76,7 @@ swabcfg(struct cpu_disklabel *pcpul) int main(int argc, char *argv[]) { - struct cpu_disklabel *pcpul; + struct mvmedisklabel *pcpul; struct stat stat; int exe_file; int tape_vid; @@ -104,8 +103,8 @@ main(int argc, char *argv[]) snprintf(fileext, sizeof fileext, "boot%c%c", filename[4], filename[5]); tape_exe = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); - pcpul = (struct cpu_disklabel *)malloc(sizeof(struct cpu_disklabel)); - bzero(pcpul, sizeof(struct cpu_disklabel)); + pcpul = (struct mvmedisklabel *)malloc(sizeof(struct mvmedisklabel)); + bzero(pcpul, sizeof(struct mvmedisklabel)); memcpy(pcpul->vid_id, "NBSD", sizeof pcpul->vid_id); @@ -150,7 +149,7 @@ main(int argc, char *argv[]) if (BYTE_ORDER != BIG_ENDIAN) swabcfg(pcpul); - write(tape_vid, pcpul, sizeof(struct cpu_disklabel)); + write(tape_vid, pcpul, sizeof(struct mvmedisklabel)); free(pcpul); |