Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Rather than scatter set_swap() calls wrappe...
details: https://anonhg.NetBSD.org/src/rev/38c3aaa9b12f
branches: trunk
changeset: 335304:38c3aaa9b12f
user: abs <abs%NetBSD.org@localhost>
date: Fri Jan 02 19:43:13 2015 +0000
description:
Rather than scatter set_swap() calls wrapped in ram size checks through
md_post_disklabel() and md_pre_update(), abstract them out to an MI
set_swap_if_low_ram() and call from the appropriate MI places.
Now all platforms add swap if the system has <= 32M of RAM.
diffstat:
usr.sbin/sysinst/arch/arc/md.c | 7 +------
usr.sbin/sysinst/arch/cobalt/md.c | 8 +-------
usr.sbin/sysinst/arch/evbsh3/md.c | 3 +--
usr.sbin/sysinst/arch/hp300/md.c | 7 +------
usr.sbin/sysinst/arch/hpcsh/md.c | 3 +--
usr.sbin/sysinst/arch/i386/md.c | 7 +------
usr.sbin/sysinst/arch/luna68k/md.c | 10 +---------
usr.sbin/sysinst/arch/mvme68k/md.c | 7 +------
usr.sbin/sysinst/arch/news68k/md.c | 3 +--
usr.sbin/sysinst/arch/sgimips/md.c | 3 +--
usr.sbin/sysinst/arch/vax/md.c | 8 +-------
usr.sbin/sysinst/arch/x68k/md.c | 6 +-----
usr.sbin/sysinst/defs.h | 3 ++-
usr.sbin/sysinst/disks.c | 9 ++++++++-
usr.sbin/sysinst/install.c | 3 ++-
usr.sbin/sysinst/partman.c | 3 ++-
usr.sbin/sysinst/upgrade.c | 5 ++++-
17 files changed, 30 insertions(+), 65 deletions(-)
diffs (truncated from 389 to 300 lines):
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -247,8 +247,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
return 0;
}
@@ -291,9 +289,6 @@
mbr_info_t *ext;
int i;
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, NULL);
-
read_mbr(pm->diskdev, &mbr);
/* do a sanity check of the partition table */
for (ext = &mbr; ext; ext = ext->extended) {
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -248,9 +248,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -310,9 +307,6 @@
mbr_info_t *ext;
int i;
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, NULL);
-
read_mbr(pm->diskdev, &mbr);
/* do a sanity check of the partition table */
for (ext = &mbr; ext; ext = ext->extended) {
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/evbsh3/md.c
--- a/usr.sbin/sysinst/arch/evbsh3/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/evbsh3/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -106,7 +106,6 @@
int
md_post_disklabel(void)
{
-
return 0;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/hp300/md.c
--- a/usr.sbin/sysinst/arch/hp300/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/hp300/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -176,9 +176,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -218,8 +215,6 @@
int
md_pre_update(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, NULL);
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/hpcsh/md.c
--- a/usr.sbin/sysinst/arch/hpcsh/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/hpcsh/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:39 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -110,7 +110,6 @@
int
md_post_disklabel(void)
{
-
return 0;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.4 2014/10/11 13:34:01 gson Exp $ */
+/* $NetBSD: md.c,v 1.5 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -285,9 +285,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -408,8 +405,6 @@
int
md_pre_update(void)
{
- if (get_ramsize() <= 8)
- set_swap(pm->diskdev, NULL);
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/luna68k/md.c
--- a/usr.sbin/sysinst/arch/luna68k/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/luna68k/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2014/08/04 08:59:28 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -154,10 +154,6 @@
int
md_post_disklabel(void)
{
-
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -217,10 +213,6 @@
int
md_pre_update(void)
{
-
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/mvme68k/md.c
--- a/usr.sbin/sysinst/arch/mvme68k/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/mvme68k/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -174,9 +174,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -219,8 +216,6 @@
int
md_pre_update(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, NULL);
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/news68k/md.c
--- a/usr.sbin/sysinst/arch/news68k/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/news68k/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -139,7 +139,6 @@
int
md_post_disklabel(void)
{
-
return 0;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/sgimips/md.c
--- a/usr.sbin/sysinst/arch/sgimips/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/sgimips/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -156,7 +156,6 @@
int
md_post_disklabel(void)
{
- set_swap(pm->diskdev, pm->bsdlabel);
if (strstr(instsys.version, "(INSTALL32_IP3x)"))
return run_program(RUN_DISPLAY,
"%s %s", "/usr/mdec/sgivol -f -w boot /usr/mdec/ip3xboot",
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/vax/md.c
--- a/usr.sbin/sysinst/arch/vax/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/vax/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:41 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:14 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -143,9 +143,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, pm->bsdlabel);
-
return 0;
}
@@ -182,9 +179,6 @@
int
md_pre_update(void)
{
- if (get_ramsize() <= 32)
- set_swap(pm->diskdev, NULL);
-
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/arch/x68k/md.c
--- a/usr.sbin/sysinst/arch/x68k/md.c Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/arch/x68k/md.c Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.2 2014/08/03 16:09:41 martin Exp $ */
+/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:14 abs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -262,8 +262,6 @@
int
md_post_disklabel(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, pm->bsdlabel);
return 0;
}
@@ -305,8 +303,6 @@
int
md_pre_update(void)
{
- if (get_ramsize() < 6)
- set_swap(pm->diskdev, NULL);
return 1;
}
diff -r 30f5eef3172e -r 38c3aaa9b12f usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h Fri Jan 02 19:42:05 2015 +0000
+++ b/usr.sbin/sysinst/defs.h Fri Jan 02 19:43:13 2015 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index