Module Name:    src
Committed By:   tsutsui
Date:           Wed Apr 22 17:21:48 UTC 2009

Modified Files:
        src/distrib/utils/sysinst/arch/landisk: md.c md.h

Log Message:
Add UFS2 root and boot support.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/utils/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/sysinst/arch/landisk/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/landisk/md.c
diff -u src/distrib/utils/sysinst/arch/landisk/md.c:1.4 src/distrib/utils/sysinst/arch/landisk/md.c:1.5
--- src/distrib/utils/sysinst/arch/landisk/md.c:1.4	Wed Apr 22 16:53:15 2009
+++ src/distrib/utils/sysinst/arch/landisk/md.c	Wed Apr 22 17:21:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.4 2009/04/22 16:53:15 tsutsui Exp $	*/
+/*	$NetBSD: md.c,v 1.5 2009/04/22 17:21:47 tsutsui Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -104,14 +104,22 @@
 int
 md_post_newfs(void)
 {
+	char *bootxx;
+	int error;
 
 	printf (msg_string(MSG_dobootblks), diskdev);
 	cp_to_target("/usr/mdec/boot", "/boot");
-	if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
-	    "/usr/sbin/installboot -v -m landisk /dev/r%sa /usr/mdec/bootxx_ffsv1",
-	    diskdev))
+	bootxx = bootxx_name();
+	if (bootxx != NULL) {
+		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		    "/usr/sbin/installboot -v /dev/r%sa %s", diskdev, bootxx);
+		free(bootxx);
+	} else
+		error = -1;
+
+	if (error != 0)
 		process_menu(MENU_ok,
-			 deconst("Warning: disk is probably not bootable"));
+		    deconst("Warning: disk is probably not bootable"));
 
 	return 0;
 }

Index: src/distrib/utils/sysinst/arch/landisk/md.h
diff -u src/distrib/utils/sysinst/arch/landisk/md.h:1.1 src/distrib/utils/sysinst/arch/landisk/md.h:1.2
--- src/distrib/utils/sysinst/arch/landisk/md.h:1.1	Mon Apr 14 17:24:56 2008
+++ src/distrib/utils/sysinst/arch/landisk/md.h	Wed Apr 22 17:21:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.1 2008/04/14 17:24:56 skrll Exp $	*/
+/*	$NetBSD: md.h,v 1.2 2009/04/22 17:21:47 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -46,6 +46,15 @@
 /* Megs required for a full X installation. */
 #define XNEEDMB			340
 
+/* have support for booting from UFS2 */
+#define HAVE_UFS2_BOOT
+
+/* have file system specific primary boot loader */
+#define HAVE_BOOTXX_xFS
+#define BOOTXXDIR	"/usr/mdec"
+#define BOOTXX_FFSV1	"bootxx_ffsv1"
+#define BOOTXX_FFSV2	"bootxx_ffsv2"
+
 /*
  *  Default filesets to fetch and install during installation or upgrade.
  *  The standard sets are: base etc comp games man misc text

Reply via email to