Module Name:    src
Committed By:   he
Date:           Fri May 20 14:49:54 UTC 2011

Modified Files:
        src/sys/arch/sparc/stand/ofwboot: loadfile_machdep.c ofdev.c
Added Files:
        src/sys/arch/sparc/stand/ofwboot: net.h

Log Message:
Put the external functions from net.c in it's own header file and
include it, and do some other minimal adjustments to bring this
back to a buildable state.

OK'ed by martin@


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc/stand/ofwboot/net.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/stand/ofwboot/ofdev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
diff -u src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.7 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.8
--- src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.7	Mon May 18 11:39:30 2009
+++ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c	Fri May 20 14:49:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadfile_machdep.c,v 1.7 2009/05/18 11:39:30 nakayama Exp $	*/
+/*	$NetBSD: loadfile_machdep.c,v 1.8 2011/05/20 14:49:54 he Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -30,6 +30,7 @@
  */
 
 #include <lib/libsa/stand.h>
+#include <lib/libkern/libkern.h>
 
 #include <machine/pte.h>
 #include <machine/cpu.h>

Index: src/sys/arch/sparc/stand/ofwboot/ofdev.c
diff -u src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.28 src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.29
--- src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.28	Sun Apr  4 21:49:15 2010
+++ src/sys/arch/sparc/stand/ofwboot/ofdev.c	Fri May 20 14:49:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.28 2010/04/04 21:49:15 martin Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.29 2011/05/20 14:49:54 he Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -55,6 +55,7 @@
 #include <machine/promlib.h>
 
 #include "ofdev.h"
+#include "net.h"
 #include "boot.h"
 
 extern char bootdev[];
@@ -545,7 +546,7 @@
 		if (!strncmp(*file,"/tftp:",6)) {
 			*file += 6;
 			memcpy(&file_system[0], &file_system_tftp, sizeof file_system[0]);
-			if (net_tftp_bootp(&of->f_devdata)) {
+			if (net_tftp_bootp((int**)&of->f_devdata)) {
 				net_close(&ofdev);
 				goto bad;
 			}

Added files:

Index: src/sys/arch/sparc/stand/ofwboot/net.h
diff -u /dev/null src/sys/arch/sparc/stand/ofwboot/net.h:1.1
--- /dev/null	Fri May 20 14:49:54 2011
+++ src/sys/arch/sparc/stand/ofwboot/net.h	Fri May 20 14:49:54 2011
@@ -0,0 +1,42 @@
+/* $NetBSD: net.h,v 1.1 2011/05/20 14:49:54 he Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _OFWBOOT_NET_H
+#define _OFWBOOT_NET_H
+
+extern int	net_open(struct of_dev *);
+extern int	net_close(struct of_dev *);
+extern int	net_mountroot_bootparams(void);
+extern int	net_mountroot_bootp(void);
+extern int	net_tftp_bootp(int **);
+extern int	net_mountroot(void);
+
+#endif /* _OFWBOOT_NET_H */

Reply via email to