Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/stand/ofwboot Fix boot failure on OF 2.0 mac...
details: https://anonhg.NetBSD.org/src/rev/4a5b19a7bdbe
branches: trunk
changeset: 777451:4a5b19a7bdbe
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Feb 19 12:02:55 2012 +0000
description:
Fix boot failure on OF 2.0 machines.
Discussed with phx@ on port-macppc@:
http://mail-index.NetBSD.org/port-macppc/2012/02/18/msg001556.html
Should be pulled up to netbsd-6.
diffstat:
sys/arch/macppc/stand/ofwboot/boot.c | 4 ++--
sys/arch/macppc/stand/ofwboot/boot.h | 1 +
sys/arch/macppc/stand/ofwboot/ofdev.c | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 0e8460683868 -r 4a5b19a7bdbe sys/arch/macppc/stand/ofwboot/boot.c
--- a/sys/arch/macppc/stand/ofwboot/boot.c Sun Feb 19 10:39:06 2012 +0000
+++ b/sys/arch/macppc/stand/ofwboot/boot.c Sun Feb 19 12:02:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.26 2011/01/22 19:19:19 joerg Exp $ */
+/* $NetBSD: boot.c,v 1.27 2012/02/19 12:02:55 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -96,8 +96,8 @@
char bootfile[MAXBOOTPATHLEN];
int boothowto;
bool floppyboot;
+int ofw_version = 0;
-static int ofw_version = 0;
static const char *kernels[] = { "/netbsd", "/netbsd.gz", "/netbsd.macppc", NULL };
static void
diff -r 0e8460683868 -r 4a5b19a7bdbe sys/arch/macppc/stand/ofwboot/boot.h
--- a/sys/arch/macppc/stand/ofwboot/boot.h Sun Feb 19 10:39:06 2012 +0000
+++ b/sys/arch/macppc/stand/ofwboot/boot.h Sun Feb 19 12:02:55 2012 +0000
@@ -10,6 +10,7 @@
#define MAXBOOTPATHLEN 256
extern char bootdev[MAXBOOTPATHLEN];
extern bool floppyboot;
+extern int ofw_version;
#ifdef HAVE_CHANGEDISK_HOOK
struct open_file;
diff -r 0e8460683868 -r 4a5b19a7bdbe sys/arch/macppc/stand/ofwboot/ofdev.c
--- a/sys/arch/macppc/stand/ofwboot/ofdev.c Sun Feb 19 10:39:06 2012 +0000
+++ b/sys/arch/macppc/stand/ofwboot/ofdev.c Sun Feb 19 12:02:55 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofdev.c,v 1.25 2012/02/01 21:48:22 matt Exp $ */
+/* $NetBSD: ofdev.c,v 1.26 2012/02/19 12:02:55 tsutsui Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -425,7 +425,8 @@
return ENXIO;
if (!strcmp(buf, "block") && strrchr(devname, ':') == NULL)
/* indicate raw partition, when missing */
- strlcat(devname, ":0", sizeof(devname));
+ if (ofw_version >= 3)
+ strlcat(devname, ":0", sizeof(devname));
if ((handle = OF_open(devname)) == -1)
return ENXIO;
memset(&ofdev, 0, sizeof ofdev);
Home |
Main Index |
Thread Index |
Old Index