diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-25 16:55:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-25 16:55:32 +0000 |
commit | 6be30a2cf89bb382ebec254ca6b29a4261e9c374 (patch) | |
tree | 6c0d4ad5eb837d64b82ce603bb22a0a18bdfc1ae /sys/arch | |
parent | b233c3a1ff6b091ece3665b0d7c385128fd1ab7a (diff) |
Don't forget to actually return a value in ttyname(), and fix a bunch of
warnings while there.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/stand/Locore.c | 5 | ||||
-rw-r--r-- | sys/arch/macppc/stand/alloc.c | 7 | ||||
-rw-r--r-- | sys/arch/macppc/stand/main.c | 14 | ||||
-rw-r--r-- | sys/arch/macppc/stand/netif_of.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/stand/ofdev.c | 8 |
5 files changed, 15 insertions, 23 deletions
diff --git a/sys/arch/macppc/stand/Locore.c b/sys/arch/macppc/stand/Locore.c index 46664f4daef..9cdde862594 100644 --- a/sys/arch/macppc/stand/Locore.c +++ b/sys/arch/macppc/stand/Locore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: Locore.c,v 1.14 2008/01/23 16:37:57 jsing Exp $ */ +/* $OpenBSD: Locore.c,v 1.15 2008/05/25 16:55:31 miod Exp $ */ /* $NetBSD: Locore.c,v 1.1 1997/04/16 20:29:11 thorpej Exp $ */ /* @@ -42,6 +42,7 @@ */ #define ENABLE_DECREMENTER_WORKAROUND +void patch_dec_intr(); static int (*openfirmware)(void *); @@ -114,7 +115,7 @@ __asm ( " .globl handle_decr_intr\n" "handle_decr_intr:\n" " rfi\n"); - +void patch_dec_intr() { int time; diff --git a/sys/arch/macppc/stand/alloc.c b/sys/arch/macppc/stand/alloc.c index 94a9cc7af08..1981e842f0f 100644 --- a/sys/arch/macppc/stand/alloc.c +++ b/sys/arch/macppc/stand/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.5 2007/05/28 22:17:21 pyr Exp $ */ +/* $OpenBSD: alloc.c,v 1.6 2008/05/25 16:55:31 miod Exp $ */ /* $NetBSD: alloc.c,v 1.1 1997/04/16 20:29:16 thorpej Exp $ */ /* @@ -86,9 +86,6 @@ struct ml { LIST_ENTRY(ml) list; }; -/* XXX - this is from NetBSD */ -#define LIST_HEAD_INITIALIZER(head) { NULL } - LIST_HEAD(, ml) freelist = LIST_HEAD_INITIALIZER(freelist); LIST_HEAD(, ml) allocatedlist = LIST_HEAD_INITIALIZER(allocatedlist); @@ -97,7 +94,7 @@ LIST_HEAD(, ml) allocatedlist = LIST_HEAD_INITIALIZER(allocatedlist); void * alloc(unsigned size) { - struct ml *f, *bestf; + struct ml *f, *bestf = NULL; unsigned bestsize = 0xffffffff; /* greater than any real size */ char *help; int failed; diff --git a/sys/arch/macppc/stand/main.c b/sys/arch/macppc/stand/main.c index d376a1105ff..a238ac5ce1c 100644 --- a/sys/arch/macppc/stand/main.c +++ b/sys/arch/macppc/stand/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 2007/11/27 16:22:13 martynas Exp $ */ +/* $OpenBSD: main.c,v 1.5 2008/05/25 16:55:31 miod Exp $ */ /* $NetBSD: boot.c,v 1.1 1997/04/16 20:29:17 thorpej Exp $ */ /* @@ -135,7 +135,10 @@ static void chain(void (*entry)(), char *args, void *ssym, void *esym) { extern char end[]; - int l, machine_tag; + int l; +#ifdef __notyet__ + int machine_tag; +#endif freeall(); @@ -175,9 +178,6 @@ int main() { int chosen; - u_long marks[MARK_MAX]; - int fd; - /* * Get the boot arguments from Openfirmware @@ -224,6 +224,7 @@ devboot(dev_t dev, char *p) strlcpy(p, bootdev, BOOTDEVLEN); } +int run_loadfile(u_long *marks, int howto) { char bootline[512]; /* Should check size? */ @@ -261,7 +262,6 @@ run_loadfile(u_long *marks, int howto) _rtt(); return 0; - } int @@ -276,7 +276,7 @@ char * ttyname(int fd) { snprintf(ttyname_buf, sizeof ttyname_buf, "ofc0"); - + return ttyname_buf; } dev_t diff --git a/sys/arch/macppc/stand/netif_of.c b/sys/arch/macppc/stand/netif_of.c index cde570269e0..7f66c812694 100644 --- a/sys/arch/macppc/stand/netif_of.c +++ b/sys/arch/macppc/stand/netif_of.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netif_of.c,v 1.4 2003/10/16 04:30:09 drahn Exp $ */ +/* $OpenBSD: netif_of.c,v 1.5 2008/05/25 16:55:31 miod Exp $ */ /* $NetBSD: netif_of.c,v 1.1 1997/04/16 20:29:19 thorpej Exp $ */ /* @@ -78,8 +78,6 @@ netif_open(void *machdep_hint) { struct of_dev *op = machdep_hint; struct iodesc *io; - int fd, error; - char addr[32]; #ifdef NETIF_DEBUG printf("netif_open..."); diff --git a/sys/arch/macppc/stand/ofdev.c b/sys/arch/macppc/stand/ofdev.c index 09783f6a087..1169aacc9f9 100644 --- a/sys/arch/macppc/stand/ofdev.c +++ b/sys/arch/macppc/stand/ofdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdev.c,v 1.14 2007/06/14 03:27:16 drahn Exp $ */ +/* $OpenBSD: ofdev.c,v 1.15 2008/05/25 16:55:31 miod Exp $ */ /* $NetBSD: ofdev.c,v 1.1 1997/04/16 20:29:20 thorpej Exp $ */ /* @@ -56,9 +56,8 @@ char namebuf[256]; static char * filename(char *str) { - char *cp, *lp; + char *cp; char savec; - int dhandle; cp = strrchr(str, ':'); if (cp == NULL) @@ -159,8 +158,6 @@ int read_mac_label(struct of_dev *devp, char *buf, struct disklabel *lp) { struct part_map_entry *part; - struct buf *bp; - int err; size_t read; int part_cnt; int i; @@ -284,7 +281,6 @@ devopen(struct open_file *of, const char *name, char **file) { char *cp; char fname[256]; - char devname[256]; char buf[DEV_BSIZE]; struct disklabel label; int handle, part; |