Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst/arch In the new world order disks may come ...
details: https://anonhg.NetBSD.org/src/rev/b949ecf4c3de
branches: trunk
changeset: 457156:b949ecf4c3de
user: martin <martin%NetBSD.org@localhost>
date: Thu Jun 13 09:36:54 2019 +0000
description:
In the new world order disks may come without any partitioning scheme
attached - so the user may have to select one.
diffstat:
usr.sbin/sysinst/arch/arc/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/bebox/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/cobalt/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/evbarm/md.c | 24 +++++++++++++++++++++++-
usr.sbin/sysinst/arch/evbmips/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/evbppc/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/hpcarm/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/hpcmips/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/hpcsh/md.c | 24 +++++++++++++++++++++++-
usr.sbin/sysinst/arch/landisk/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/ofppc/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/prep/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/sandpoint/md.c | 25 ++++++++++++++++++++++++-
usr.sbin/sysinst/arch/zaurus/md.c | 25 ++++++++++++++++++++++++-
14 files changed, 334 insertions(+), 14 deletions(-)
diffs (truncated from 544 to 300 lines):
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.5 2019/06/12 06:20:18 martin Exp $ */
+/* $NetBSD: md.c,v 1.6 2019/06/13 09:36:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -65,6 +65,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/bebox/md.c
--- a/usr.sbin/sysinst/arch/bebox/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/bebox/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:19 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2019/06/13 09:36:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -58,6 +58,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.5 2019/06/12 06:20:19 martin Exp $ */
+/* $NetBSD: md.c,v 1.6 2019/06/13 09:36:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -65,6 +65,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/evbarm/md.c
--- a/usr.sbin/sysinst/arch/evbarm/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbarm/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.6 2019/06/12 06:20:19 martin Exp $ */
+/* $NetBSD: md.c,v 1.7 2019/06/13 09:36:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -73,6 +73,28 @@
md_get_info(struct install_partition_desc *install)
{
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
if (boardtype == BOARD_TYPE_RPI)
return set_bios_geom_with_mbr_guess(pm->parts);
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/evbmips/md.c
--- a/usr.sbin/sysinst/arch/evbmips/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbmips/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:19 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2019/06/13 09:36:55 martin Exp $ */
/*
* Copyright 1997,2002 Piermont Information Systems Inc.
@@ -58,6 +58,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/evbppc/md.c
--- a/usr.sbin/sysinst/arch/evbppc/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/evbppc/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:19 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2019/06/13 09:36:55 martin Exp $ */
/*
* Copyright 1997,2002 Piermont Information Systems Inc.
@@ -58,6 +58,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/hpcarm/md.c
--- a/usr.sbin/sysinst/arch/hpcarm/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/hpcarm/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:20 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2019/06/13 09:36:55 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -87,6 +87,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
+ if (!parts)
+ return false;
+
+ pm->parts = parts;
+ if (ps->size_limit > 0 && pm->dlsize > ps->size_limit)
+ pm->dlsize = ps->size_limit;
+ }
+
return set_bios_geom_with_mbr_guess(pm->parts);
}
diff -r f9dc32c684fa -r b949ecf4c3de usr.sbin/sysinst/arch/hpcmips/md.c
--- a/usr.sbin/sysinst/arch/hpcmips/md.c Thu Jun 13 07:44:27 2019 +0000
+++ b/usr.sbin/sysinst/arch/hpcmips/md.c Thu Jun 13 09:36:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:20 martin Exp $ */
+/* $NetBSD: md.c,v 1.4 2019/06/13 09:36:55 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -61,6 +61,29 @@
bool
md_get_info(struct install_partition_desc *install)
{
+
+ if (pm->no_mbr || pm->no_part)
+ return true;
+
+ if (pm->parts == NULL) {
+
+ const struct disk_partitioning_scheme *ps =
+ select_part_scheme(pm, NULL, true, NULL);
+
+ if (!ps)
+ return true;
+
+ struct disk_partitions *parts =
+ (*ps->create_new_for_disk)(pm->diskdev,
+ 0, pm->dlsize, pm->dlsize, true);
Home |
Main Index |
Thread Index |
Old Index