Module Name:    src
Committed By:   dholland
Date:           Sat Jul 26 19:56:30 UTC 2014

Modified Files:
        src/usr.sbin/sysinst: Makefile
Added Files:
        src/usr.sbin/sysinst/arch/dummy: Makefile md.c md.h msg.md.de msg.md.en
            msg.md.es msg.md.fr msg.md.pl

Log Message:
Add a dummy sysinst architecture for ports that don't have their own yet.

This makes the presence of sysinst in /usr/sbin MI (as intended) --
remember that one of the goals is for sysinst to be able to install
chroots, and installing a chroot is a sensible operation on all ports,
even those for which an installer per se might not make sense.

Currently this dummy architecture fails instead of doing anything, but
as they say, one thing at a time.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/sysinst/arch/dummy/Makefile \
    src/usr.sbin/sysinst/arch/dummy/md.c src/usr.sbin/sysinst/arch/dummy/md.h \
    src/usr.sbin/sysinst/arch/dummy/msg.md.de \
    src/usr.sbin/sysinst/arch/dummy/msg.md.en \
    src/usr.sbin/sysinst/arch/dummy/msg.md.es \
    src/usr.sbin/sysinst/arch/dummy/msg.md.fr \
    src/usr.sbin/sysinst/arch/dummy/msg.md.pl

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

Modified files:

Index: src/usr.sbin/sysinst/Makefile
diff -u src/usr.sbin/sysinst/Makefile:1.1 src/usr.sbin/sysinst/Makefile:1.2
--- src/usr.sbin/sysinst/Makefile:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/Makefile	Sat Jul 26 19:56:30 2014
@@ -1,9 +1,14 @@
-#	$NetBSD: Makefile,v 1.1 2014/07/26 19:30:44 dholland Exp $
+#	$NetBSD: Makefile,v 1.2 2014/07/26 19:56:30 dholland Exp $
 #
 # sysinst is usually built when the crunched install binary is built,
 # but can be built here as a normal program for testing.
 
-SUBDIR = arch/${MACHINE}
+.if exists(arch/${MACHINE})
+SUBDIR+=arch/${MACHINE}
+.else
+SUBDIR+=arch/dummy
+.endif
+
 
 .if ALL_MACHINES
 
@@ -49,6 +54,13 @@ SUBDIR += arch/x68k
 SUBDIR += arch/zaurus
 
 # XXX notyet SUBDIR += arch/iyonix
+
+# These dirs are present in sys/arch but not here:
+#    amigappc cesfic dreamcast epoc32 evbsh3 ia64 ibmnws iyonix luna68k
+#    mmeye mvmeppc netwinder next68k rs6000 sbmips sun2 sun3
+# (also evbsh5, but it doesn't really exist)
+SUBDIR += arch/dummy
+
 .endif
 
 install:

Added files:

Index: src/usr.sbin/sysinst/arch/dummy/Makefile
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/Makefile:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/Makefile	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2014/07/26 19:56:30 dholland Exp $
+#
+# Makefile for dummy architecture
+#
+
+MENUS_MD=
+
+.include "../../Makefile.inc"
Index: src/usr.sbin/sysinst/arch/dummy/md.c
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/md.c:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/md.c	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,115 @@
+/*	$NetBSD: md.c,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * Based on code written by Philip A. Nelson for Piermont Information
+ * Systems Inc.
+ *
+ * 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.
+ * 3. The name of Piermont Information Systems Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
+ */
+
+#include <err.h>
+
+#include "defs.h"
+#include "md.h"
+
+void
+md_init(void)
+{
+	errx(1, "sysinst has not been properly ported to this platform");
+}
+
+void
+md_init_set_status(int flags)
+{
+	(void)flags;
+}
+
+int
+md_get_info(void)
+{
+	return 1;
+}
+
+int
+md_make_bsd_partitions(void)
+{
+	return make_bsd_partitions();
+}
+
+int
+md_check_partitions(void)
+{
+	return 1;
+}
+
+int
+md_pre_disklabel(void)
+{
+	return 0;
+}
+
+int
+md_post_disklabel(void)
+{
+	return 0;
+}
+
+int
+md_post_newfs(void)
+{
+	return 0;
+}
+
+int
+md_post_extract(void)
+{
+	return 0;
+}
+
+void
+md_cleanup_install(void)
+{
+}
+
+int
+md_pre_update(void)
+{
+	return 1;
+}
+
+int
+md_update(void)
+{
+	return 1;
+}
+
+int
+md_pre_mount(void)
+{
+	return 0;
+}
Index: src/usr.sbin/sysinst/arch/dummy/md.h
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/md.h:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/md.h	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,35 @@
+/*	$NetBSD: md.h,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * Based on code written by Philip A. Nelson for Piermont Information
+ * Systems Inc.
+ *
+ * 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.
+ * 3. The name of Piermont Information Systems Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
+ */
+
+#define XNEEDMB		100
Index: src/usr.sbin/sysinst/arch/dummy/msg.md.de
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/msg.md.de:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/msg.md.de	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,9 @@
+/*	$NetBSD: msg.md.de,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
Index: src/usr.sbin/sysinst/arch/dummy/msg.md.en
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/msg.md.en:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/msg.md.en	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,9 @@
+/*	$NetBSD: msg.md.en,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
Index: src/usr.sbin/sysinst/arch/dummy/msg.md.es
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/msg.md.es:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/msg.md.es	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,9 @@
+/*	$NetBSD: msg.md.es,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
Index: src/usr.sbin/sysinst/arch/dummy/msg.md.fr
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/msg.md.fr:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/msg.md.fr	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,9 @@
+/*	$NetBSD: msg.md.fr,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}
Index: src/usr.sbin/sysinst/arch/dummy/msg.md.pl
diff -u /dev/null src/usr.sbin/sysinst/arch/dummy/msg.md.pl:1.1
--- /dev/null	Sat Jul 26 19:56:30 2014
+++ src/usr.sbin/sysinst/arch/dummy/msg.md.pl	Sat Jul 26 19:56:30 2014
@@ -0,0 +1,9 @@
+/*	$NetBSD: msg.md.pl,v 1.1 2014/07/26 19:56:30 dholland Exp $	*/
+
+message md_hello
+{
+}
+
+message md_may_remove_boot_medium
+{
+}

Reply via email to