diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-05-03 22:47:46 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-05-03 22:47:46 +0000 |
commit | 00643782085b380c153577e17447f93d2dfd479b (patch) | |
tree | 56e064399ece314675935cbdb6cfa34b21aaad54 /sys/arch/hppa/stand | |
parent | 5536ef0569d704c1a7dbc2e355846fec3a7911cd (diff) |
lifvar.h -- bye, bye
Diffstat (limited to 'sys/arch/hppa/stand')
-rw-r--r-- | sys/arch/hppa/stand/libsa/lif.c | 11 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/hppa/stand/mkboot/mkboot.c | 23 |
3 files changed, 19 insertions, 19 deletions
diff --git a/sys/arch/hppa/stand/libsa/lif.c b/sys/arch/hppa/stand/libsa/lif.c index 6a7f2d0e347..dbc23798f73 100644 --- a/sys/arch/hppa/stand/libsa/lif.c +++ b/sys/arch/hppa/stand/libsa/lif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lif.c,v 1.3 1999/01/25 20:15:23 mickey Exp $ */ +/* $OpenBSD: lif.c,v 1.4 1999/05/03 22:46:38 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -31,9 +31,8 @@ */ #include <sys/param.h> -#include <lib/libsa/stand.h> - -#include <machine/lifvar.h> +#include <sys/disklabel.h> +#include "libsa.h" extern int debug; @@ -59,7 +58,7 @@ lif_open (path, f) register struct file *fp; register struct lifdir *dp; register char *p = NULL, *q = NULL; /* XXX shut up gcc */ - struct load load; + struct lif_load load; int err, buf_size, l; #ifdef LIFDEBUG @@ -75,7 +74,7 @@ lif_open (path, f) if (debug) printf("lif_open: unable to read LIF header (%d)\n", err); #endif - } else if ((fp->f_lp = (struct lifvol *)fp->f_buf)->vol_id == VOL_ID) { + } else if ((fp->f_lp = (struct lifvol *)fp->f_buf)->vol_id == LIF_VOL_ID) { f->f_fsdata = fp; fp->f_ld = (struct lifdir *)(fp->f_buf + LIF_DIRSTART); fp->f_seek = 0; diff --git a/sys/arch/hppa/stand/libsa/machdep.c b/sys/arch/hppa/stand/libsa/machdep.c index 79b285cee48..87dfa733697 100644 --- a/sys/arch/hppa/stand/libsa/machdep.c +++ b/sys/arch/hppa/stand/libsa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.4 1999/04/20 20:01:02 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.5 1999/05/03 22:46:38 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -31,11 +31,11 @@ */ #include <sys/param.h> +#include <sys/disklabel.h> #include <sys/reboot.h> #include "libsa.h" #include <machine/iomod.h> #include <machine/pdc.h> -#include <machine/lifvar.h> #include "dev_hppa.h" diff --git a/sys/arch/hppa/stand/mkboot/mkboot.c b/sys/arch/hppa/stand/mkboot/mkboot.c index 7da97bf28e1..a68d4a6dd55 100644 --- a/sys/arch/hppa/stand/mkboot/mkboot.c +++ b/sys/arch/hppa/stand/mkboot/mkboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkboot.c,v 1.5 1998/09/29 07:12:58 mickey Exp $ */ +/* $OpenBSD: mkboot.c,v 1.6 1999/05/03 22:47:05 mickey Exp $ */ /* * Copyright (c) 1990, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: mkboot.c,v 1.5 1998/09/29 07:12:58 mickey Exp $"; +static char rcsid[] = "$OpenBSD: mkboot.c,v 1.6 1999/05/03 22:47:05 mickey Exp $"; #endif /* not lint */ #endif @@ -63,9 +63,9 @@ static char rcsid[] = "$OpenBSD: mkboot.c,v 1.5 1998/09/29 07:12:58 mickey Exp $ #ifndef hppa /* hack for cross compile XXX */ -#include "../../include/lifvar.h" +#include "../../include/disklabel.h" #else -#include <machine/lifvar.h> +#include <sys/disklabel.h> #endif #include <stdio.h> @@ -142,10 +142,10 @@ main(argc, argv) lifd[7] = lifd[6] = lifd[5] = lifd[4] = lifd[3] = lifd[2] = lifd[1]; /* record volume info */ - lifv->vol_id = htobe16(VOL_ID); + lifv->vol_id = htobe16(LIF_VOL_ID); strncpy(lifv->vol_label, "BOOT44", 6); lifv->vol_addr = htobe32(btolifs(LIF_DIRSTART)); - lifv->vol_oct = htobe16(VOL_OCT); + lifv->vol_oct = htobe16(LIF_VOL_OCT); lifv->vol_dirsize = htobe32(btolifs(LIF_DIRSIZE)); lifv->vol_version = htobe16(1); lifv->vol_lastvol = lifv->vol_number = htobe16(1); @@ -167,17 +167,17 @@ main(argc, argv) if (lifv->ipl_entry == 0) { lifv->ipl_entry = htobe32(loadpoint + entry); lifv->ipl_size = htobe32(lifstob(n)); - lifd[optind].dir_type = htobe16(DIR_ISL); + lifd[optind].dir_type = htobe16(LIF_DIR_ISL); lifd[optind].dir_implement = 0; } else { - lifd[optind].dir_type = htobe16(DIR_TYPE); + lifd[optind].dir_type = htobe16(LIF_DIR_TYPE); lifd[1].dir_implement = htobe32(loadpoint + entry); } strcpy(lifd[optind].dir_name, lifname(argv[optind])); lifd[optind].dir_length = htobe32(n); bcddate(argv[optind], lifd[optind].dir_toc); - lifd[optind].dir_flag = htobe16(DIR_FLAG); + lifd[optind].dir_flag = htobe16(LIF_DIR_FLAG); lifv->vol_length += n; pos += lifstob(n); @@ -206,7 +206,7 @@ putfile(from_file, to) register int n, total; char buf[2048]; int from, check_sum = 0; - struct load load; + struct lif_load load; if ((from = open(from_file, O_RDONLY)) < 0) err(1, from_file); @@ -218,7 +218,6 @@ putfile(from_file, to) entry = ex.a_entry; if (N_GETMAGIC(ex) == OMAGIC || N_GETMAGIC(ex) == NMAGIC) entry += sizeof(ex); - else if (IS_ELF(*(Elf32_Ehdr *)&ex)) { Elf32_Ehdr elf_header; Elf32_Phdr *elf_segments; @@ -309,6 +308,8 @@ putfile(from_file, to) } else total += n; + /* TODO should pad here to the 65k boundary for tape boot */ + if (verbose) warnx("checksum is 0x%08x", -check_sum); |