Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/stand/ofwboot Put the external functions from...
details: https://anonhg.NetBSD.org/src/rev/0f75a17aaf67
branches: trunk
changeset: 765171:0f75a17aaf67
user: he <he%NetBSD.org@localhost>
date: Fri May 20 14:49:54 2011 +0000
description:
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@
diffstat:
sys/arch/sparc/stand/ofwboot/loadfile_machdep.c | 3 +-
sys/arch/sparc/stand/ofwboot/net.h | 42 +++++++++++++++++++++++++
sys/arch/sparc/stand/ofwboot/ofdev.c | 5 +-
3 files changed, 47 insertions(+), 3 deletions(-)
diffs (89 lines):
diff -r 675891fc8763 -r 0f75a17aaf67 sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
--- a/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Fri May 20 14:27:48 2011 +0000
+++ b/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Fri May 20 14:49:54 2011 +0000
@@ -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>
diff -r 675891fc8763 -r 0f75a17aaf67 sys/arch/sparc/stand/ofwboot/net.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc/stand/ofwboot/net.h Fri May 20 14:49:54 2011 +0000
@@ -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 */
diff -r 675891fc8763 -r 0f75a17aaf67 sys/arch/sparc/stand/ofwboot/ofdev.c
--- a/sys/arch/sparc/stand/ofwboot/ofdev.c Fri May 20 14:27:48 2011 +0000
+++ b/sys/arch/sparc/stand/ofwboot/ofdev.c Fri May 20 14:49:54 2011 +0000
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index