Module Name:    src
Committed By:   macallan
Date:           Sat Mar  3 22:50:17 UTC 2018

Modified Files:
        src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
get bootpath from OF if we don't get it as an argument


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/powerpc/oea/ofwoea_machdep.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/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.43 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.44
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.43	Fri Mar  2 14:37:18 2018
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Sat Mar  3 22:50:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.43 2018/03/02 14:37:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.44 2018/03/03 22:50:17 macallan Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -230,6 +230,13 @@ ofwoea_initppc(u_int startkernel, u_int 
 			while (*args)
 				BOOT_FLAG(*args++, boothowto);
 		}
+	} else {
+		int chs = OF_finddevice("/chosen");
+		int len;
+
+		len = OF_getprop(chs, "bootpath", bootpath, sizeof(bootpath) - 1);
+		if (len > -1)
+			bootpath[len] = 0;
 	}
 
 	uvm_md_init();

Reply via email to