diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-09 18:09:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-09 18:09:00 +0000 |
commit | a0ea7ab6dfd0eb2a3747068fc5f4be10e2a2d20f (patch) | |
tree | 614107b3312028adec4fe51d0a66ea13a520e895 /sys/arch/sgi/stand | |
parent | 5b2769fd2610db19e0f601aa68fb736aa17eb701 (diff) |
Promote types in ARCBios function prototypes from int to long whenever
necessary, to allow the same C code to be used against 32 bit ARCBios, when
compiled in 32 bit mode, or against 64 bit ARCBios, when compiled in native
mode.
Soon to be used by the boot blocks; this commit doesn't introduce any
functional change yet.
Diffstat (limited to 'sys/arch/sgi/stand')
-rw-r--r-- | sys/arch/sgi/stand/boot/arcbios.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/stand/boot/diskio.c | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/sys/arch/sgi/stand/boot/arcbios.c b/sys/arch/sgi/stand/boot/arcbios.c index 6f24c367dd3..ada86b01d14 100644 --- a/sys/arch/sgi/stand/boot/arcbios.c +++ b/sys/arch/sgi/stand/boot/arcbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arcbios.c,v 1.7 2008/03/27 15:11:37 jsing Exp $ */ +/* $OpenBSD: arcbios.c,v 1.8 2009/05/09 18:08:59 miod Exp $ */ /*- * Copyright (c) 1996 M. Warner Losh. All rights reserved. * Copyright (c) 1996-2004 Opsycon AB. All rights reserved. @@ -128,7 +128,7 @@ int getchar() { char buf[4]; - int cnt; + long cnt; if (Bios_Read(0, &buf[0], 1, &cnt) != 0) return (-1); @@ -140,7 +140,7 @@ void putchar(int c) { char buf[4]; - int cnt; + long cnt; if (c == '\n') { buf[0] = '\r'; diff --git a/sys/arch/sgi/stand/boot/diskio.c b/sys/arch/sgi/stand/boot/diskio.c index a1a151c8fd8..a136cd37630 100644 --- a/sys/arch/sgi/stand/boot/diskio.c +++ b/sys/arch/sgi/stand/boot/diskio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskio.c,v 1.3 2008/03/08 16:52:28 jsing Exp $ */ +/* $OpenBSD: diskio.c,v 1.4 2009/05/09 18:08:59 miod Exp $ */ /* * Copyright (c) 2000 Opsycon AB (www.opsycon.se) @@ -45,15 +45,16 @@ struct dio_softc { }; int -diostrategy(void *devdata, int rw, daddr_t bn, u_int reqcnt, char *addr, - u_int *cnt) +diostrategy(void *devdata, int rw, daddr_t bn, u_int reqcnt, void *addr, + size_t *cnt) { struct dio_softc *sc = (struct dio_softc *)devdata; struct partition *pp = &sc->sc_label.d_partitions[sc->sc_part]; - int64_t offset; - int result; + arc_quad_t offset; + long result; - offset = (pp->p_offset + bn) * DEV_BSIZE; + offset.hi = 0; + offset.lo = (pp->p_offset + bn) * DEV_BSIZE; if ((Bios_Seek(sc->sc_fd, &offset, 0) < 0) || (Bios_Read(sc->sc_fd, addr, reqcnt, &result) < 0)) @@ -71,7 +72,7 @@ dioopen(struct open_file *f, ...) struct dio_softc *sc; struct disklabel *lp; - int fd; + long fd; daddr_t labelsector; va_list ap; |