-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.
|
* Copyright (c) 1994, 1996 Carnegie-Mellon University.
|
||||||
|
@ -28,17 +28,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <lib/libsa/stand.h>
|
||||||
|
|
||||||
#include <machine/prom.h>
|
#include <machine/prom.h>
|
||||||
#include <machine/rpb.h>
|
#include <machine/rpb.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
OSFpal()
|
OSFpal()
|
||||||
{
|
{
|
||||||
struct rpb *r;
|
struct rpb *r;
|
||||||
struct ctb *t;
|
|
||||||
struct pcs *p;
|
struct pcs *p;
|
||||||
long result;
|
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
r = (struct rpb *)HWRPB_ADDR;
|
r = (struct rpb *)HWRPB_ADDR;
|
||||||
|
@ -48,7 +49,7 @@ OSFpal()
|
||||||
printf("VMS PAL revision: 0x%lx\n",
|
printf("VMS PAL revision: 0x%lx\n",
|
||||||
p->pcs_palrevisions[PALvar_OpenVMS]);
|
p->pcs_palrevisions[PALvar_OpenVMS]);
|
||||||
printf("OSF PAL rev: 0x%lx\n", p->pcs_palrevisions[PALvar_OSF1]);
|
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");
|
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
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -48,8 +48,9 @@
|
||||||
#include <machine/autoconf.h>
|
#include <machine/autoconf.h>
|
||||||
#include <machine/prom.h>
|
#include <machine/prom.h>
|
||||||
|
|
||||||
#define _KERNEL
|
#include <machine/pte.h>
|
||||||
#include "include/pte.h"
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
int loadfile __P((char *, u_int64_t *));
|
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.
|
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <err.h>
|
||||||
|
|
||||||
#define HDR_BUFSIZE 512
|
#define HDR_BUFSIZE 512
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ main(argc, argv)
|
||||||
fname = argv[2];
|
fname = argv[2];
|
||||||
|
|
||||||
if ((fd = open(fname, O_RDONLY, 0)) == -1)
|
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)
|
if (read(fd, &buf, HDR_BUFSIZE) < HDR_BUFSIZE)
|
||||||
err(1, "%s: read failed", fname);
|
err(1, "%s: read failed", fname);
|
||||||
|
@ -66,7 +67,7 @@ main(argc, argv)
|
||||||
elfp = (Elf_Ehdr *)buf;
|
elfp = (Elf_Ehdr *)buf;
|
||||||
|
|
||||||
if (!ECOFF_BADMAG(ecoffp)) {
|
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) {
|
} else if (memcmp(Elf_e_ident, elfp->e_ident, Elf_e_siz) == 0) {
|
||||||
Elf_Phdr phdr;
|
Elf_Phdr phdr;
|
||||||
|
|
||||||
|
@ -76,9 +77,10 @@ main(argc, argv)
|
||||||
if (read(fd, (void *)&phdr, sizeof(phdr)) != sizeof(phdr))
|
if (read(fd, (void *)&phdr, sizeof(phdr)) != sizeof(phdr))
|
||||||
err(1, "%s: read phdr failed", fname);
|
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
|
} else
|
||||||
errx(1, "%s: bad magic number", fname);
|
errx(1, "%s: bad magic number", fname);
|
||||||
|
|
||||||
close(fd);
|
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.
|
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||||
|
@ -109,7 +109,6 @@ loadfile(fname, entryp)
|
||||||
char *fname;
|
char *fname;
|
||||||
u_int64_t *entryp;
|
u_int64_t *entryp;
|
||||||
{
|
{
|
||||||
struct devices *dp;
|
|
||||||
union {
|
union {
|
||||||
#ifdef ALPHA_BOOT_ECOFF
|
#ifdef ALPHA_BOOT_ECOFF
|
||||||
struct ecoff_exechdr coff;
|
struct ecoff_exechdr coff;
|
||||||
|
@ -195,7 +194,7 @@ coff_exec(fd, coff, entryp)
|
||||||
ffp_save = coff->a.data_start + coff->a.dsize;
|
ffp_save = coff->a.data_start + coff->a.dsize;
|
||||||
if (ffp_save < coff->a.bss_start + coff->a.bsize)
|
if (ffp_save < coff->a.bss_start + coff->a.bsize)
|
||||||
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. */
|
ffp_save += 2; /* XXX OSF/1 does this, no idea why. */
|
||||||
|
|
||||||
(void)printf("\n");
|
(void)printf("\n");
|
||||||
|
@ -213,8 +212,6 @@ elf_exec(fd, elf, entryp)
|
||||||
{
|
{
|
||||||
Elf_Shdr *shp;
|
Elf_Shdr *shp;
|
||||||
Elf_Off off;
|
Elf_Off off;
|
||||||
void *addr;
|
|
||||||
size_t size;
|
|
||||||
int i;
|
int i;
|
||||||
int first = 1;
|
int first = 1;
|
||||||
|
|
||||||
|
@ -273,7 +270,7 @@ elf_exec(fd, elf, entryp)
|
||||||
for (first = 1, i = 0; i < elf->e_shnum; i++) {
|
for (first = 1, i = 0; i < elf->e_shnum; i++) {
|
||||||
if (shp[i].sh_type == Elf_sht_symtab ||
|
if (shp[i].sh_type == Elf_sht_symtab ||
|
||||||
shp[i].sh_type == Elf_sht_strtab) {
|
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);
|
(void)lseek(fd, shp[i].sh_offset, SEEK_SET);
|
||||||
if (read(fd, (void *)ffp_save, shp[i].sh_size) !=
|
if (read(fd, (void *)ffp_save, shp[i].sh_size) !=
|
||||||
shp[i].sh_size) {
|
shp[i].sh_size) {
|
||||||
|
@ -292,7 +289,7 @@ elf_exec(fd, elf, entryp)
|
||||||
if (first == 0)
|
if (first == 0)
|
||||||
printf("]");
|
printf("]");
|
||||||
|
|
||||||
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET & ~PGOFSET))
|
ffp_save = ALPHA_K0SEG_TO_PHYS((ffp_save + PGOFSET) & ~PGOFSET)
|
||||||
>> PGSHIFT;
|
>> PGSHIFT;
|
||||||
ffp_save += 2; /* XXX OSF/1 does this, no idea why. */
|
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
|
* Mach Operating System
|
||||||
|
@ -31,6 +31,8 @@
|
||||||
#include <machine/prom.h>
|
#include <machine/prom.h>
|
||||||
#include <machine/rpb.h>
|
#include <machine/rpb.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
int console;
|
int console;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue