-Wall fixes
This commit is contained in:
parent
d99aa8efc0
commit
80d9738db8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: OSFpal.c,v 1.2 1997/04/06 08:40:56 cgd Exp $ */
|
||||
/* $NetBSD: OSFpal.c,v 1.3 1997/09/06 14:03:55 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1996 Carnegie-Mellon University.
|
||||
|
@ -28,17 +28,18 @@
|
|||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <lib/libsa/stand.h>
|
||||
|
||||
#include <machine/prom.h>
|
||||
#include <machine/rpb.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void
|
||||
OSFpal()
|
||||
{
|
||||
struct rpb *r;
|
||||
struct ctb *t;
|
||||
struct pcs *p;
|
||||
long result;
|
||||
int offset;
|
||||
|
||||
r = (struct rpb *)HWRPB_ADDR;
|
||||
|
@ -48,7 +49,7 @@ OSFpal()
|
|||
printf("VMS PAL revision: 0x%lx\n",
|
||||
p->pcs_palrevisions[PALvar_OpenVMS]);
|
||||
printf("OSF PAL rev: 0x%lx\n", p->pcs_palrevisions[PALvar_OSF1]);
|
||||
(void)switch_palcode();
|
||||
switch_palcode();
|
||||
printf("Switch to OSF PAL code succeeded.\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.5 1997/08/13 20:49:56 cgd Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.6 1997/09/06 14:03:56 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -48,8 +48,9 @@
|
|||
#include <machine/autoconf.h>
|
||||
#include <machine/prom.h>
|
||||
|
||||
#define _KERNEL
|
||||
#include "include/pte.h"
|
||||
#include <machine/pte.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int loadfile __P((char *, u_int64_t *));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: headersize.c,v 1.2 1997/04/06 08:40:58 cgd Exp $ */
|
||||
/* $NetBSD: headersize.c,v 1.3 1997/09/06 14:03:57 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <err.h>
|
||||
|
||||
#define HDR_BUFSIZE 512
|
||||
|
||||
|
@ -58,7 +59,7 @@ main(argc, argv)
|
|||
fname = argv[2];
|
||||
|
||||
if ((fd = open(fname, O_RDONLY, 0)) == -1)
|
||||
err(1, "%s: open failed", 0);
|
||||
err(1, "%s: open failed", fname);
|
||||
|
||||
if (read(fd, &buf, HDR_BUFSIZE) < HDR_BUFSIZE)
|
||||
err(1, "%s: read failed", fname);
|
||||
|
@ -66,7 +67,7 @@ main(argc, argv)
|
|||
elfp = (Elf_Ehdr *)buf;
|
||||
|
||||
if (!ECOFF_BADMAG(ecoffp)) {
|
||||
printf("%d\n", ECOFF_TXTOFF(ecoffp));
|
||||
printf("%ld\n", ECOFF_TXTOFF(ecoffp));
|
||||
} else if (memcmp(Elf_e_ident, elfp->e_ident, Elf_e_siz) == 0) {
|
||||
Elf_Phdr phdr;
|
||||
|
||||
|
@ -76,9 +77,10 @@ main(argc, argv)
|
|||
if (read(fd, (void *)&phdr, sizeof(phdr)) != sizeof(phdr))
|
||||
err(1, "%s: read phdr failed", fname);
|
||||
|
||||
printf("%d\n", phdr.p_offset + (loadaddr - phdr.p_vaddr));
|
||||
printf("%ld\n", phdr.p_offset + (loadaddr - phdr.p_vaddr));
|
||||
} else
|
||||
errx(1, "%s: bad magic number", fname);
|
||||
|
||||
close(fd);
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: loadfile.c,v 1.6 1997/09/05 21:50:34 thorpej Exp $ */
|
||||
/* $NetBSD: loadfile.c,v 1.7 1997/09/06 14:03:57 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -109,7 +109,6 @@ loadfile(fname, entryp)
|
|||
char *fname;
|
||||
u_int64_t *entryp;
|
||||
{
|
||||
struct devices *dp;
|
||||
union {
|
||||
#ifdef ALPHA_BOOT_ECOFF
|
||||
struct ecoff_exechdr coff;
|
||||
|
@ -195,7 +194,7 @@ coff_exec(fd, coff, entryp)
|
|||
ffp_save = coff->a.data_start + coff->a.dsize;
|
||||
if (ffp_save < coff->a.bss_start + coff->a.bsize)
|
||||
ffp_save = coff->a.bss_start + coff->a.bsize;
|
||||
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET & ~PGOFSET)) >> PGSHIFT;
|
||||
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET) & ~PGOFSET) >> PGSHIFT;
|
||||
ffp_save += 2; /* XXX OSF/1 does this, no idea why. */
|
||||
|
||||
(void)printf("\n");
|
||||
|
@ -213,8 +212,6 @@ elf_exec(fd, elf, entryp)
|
|||
{
|
||||
Elf_Shdr *shp;
|
||||
Elf_Off off;
|
||||
void *addr;
|
||||
size_t size;
|
||||
int i;
|
||||
int first = 1;
|
||||
|
||||
|
@ -273,7 +270,7 @@ elf_exec(fd, elf, entryp)
|
|||
for (first = 1, i = 0; i < elf->e_shnum; i++) {
|
||||
if (shp[i].sh_type == Elf_sht_symtab ||
|
||||
shp[i].sh_type == Elf_sht_strtab) {
|
||||
printf("%s%d", first ? " [" : "+", shp[i].sh_size);
|
||||
printf("%s%ld", first ? " [" : "+", shp[i].sh_size);
|
||||
(void)lseek(fd, shp[i].sh_offset, SEEK_SET);
|
||||
if (read(fd, (void *)ffp_save, shp[i].sh_size) !=
|
||||
shp[i].sh_size) {
|
||||
|
@ -292,7 +289,7 @@ elf_exec(fd, elf, entryp)
|
|||
if (first == 0)
|
||||
printf("]");
|
||||
|
||||
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET & ~PGOFSET))
|
||||
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET) & ~PGOFSET)
|
||||
>> PGSHIFT;
|
||||
ffp_save += 2; /* XXX OSF/1 does this, no idea why. */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prom.c,v 1.2 1997/04/06 08:41:00 cgd Exp $ */
|
||||
/* $NetBSD: prom.c,v 1.3 1997/09/06 14:03:58 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -31,6 +31,8 @@
|
|||
#include <machine/prom.h>
|
||||
#include <machine/rpb.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int console;
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue