Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Don't force mounting of newfs'd partitions.
details: https://anonhg.NetBSD.org/src/rev/c46f85e87522
branches: trunk
changeset: 962339:c46f85e87522
user: martin <martin%NetBSD.org@localhost>
date: Sun Jul 14 11:26:18 2019 +0000
description:
Don't force mounting of newfs'd partitions.
Provide MD hooks for setups where we do not need any bootblocks.
diffstat:
usr.sbin/sysinst/bsddisklabel.c | 64 ++++++++++++++++++++++------------------
1 files changed, 35 insertions(+), 29 deletions(-)
diffs (109 lines):
diff -r 92cb33369c1c -r c46f85e87522 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c Sun Jul 14 11:25:10 2019 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c Sun Jul 14 11:26:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.19 2019/07/12 18:28:08 martin Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.20 2019/07/14 11:26:18 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1375,8 +1375,6 @@
infos[i].last_mounted = want->mount;
infos[i].fs_type = want->fs_type;
infos[i].fs_sub_type = want->fs_version;
- if (want->fs_type != FS_UNUSED && want->type != PT_swap)
- want->instflags |= PUIINST_NEWFS|PUIINST_MOUNT;
new_part_id = ps->pscheme->add_partition(ps,
&infos[i], NULL);
if (new_part_id == NO_PART)
@@ -1420,8 +1418,11 @@
infos[i].last_mounted = want->mount;
infos[i].fs_type = want->fs_type;
infos[i].fs_sub_type = want->fs_version;
- if (want->fs_type != FS_UNUSED && want->type != PT_swap)
- want->instflags |= PUIINST_NEWFS|PUIINST_MOUNT;
+ if (want->fs_type != FS_UNUSED && want->type != PT_swap) {
+ want->instflags |= PUIINST_NEWFS;
+ if (want->mount[0] != 0)
+ want->instflags |= PUIINST_MOUNT;
+ }
new_part_id = wanted->parts->pscheme->add_partition(
wanted->parts, &infos[i], NULL);
if (new_part_id == NO_PART)
@@ -1458,9 +1459,6 @@
infos[i].last_mounted = want->mount;
infos[i].fs_type = want->fs_type;
infos[i].fs_sub_type = want->fs_version;
- if (want->fs_type != FS_UNUSED &&
- want->type != PT_swap)
- want->instflags |= PUIINST_NEWFS|PUIINST_MOUNT;
if (wanted->parts->pscheme->add_outer_partition
!= NULL)
@@ -1663,6 +1661,10 @@
return true;
}
+#ifndef MD_NEED_BOOTBLOCK
+#define MD_NEED_BOOTBLOCK(A) true
+#endif
+
/*
* check that there is at least a / somewhere.
*/
@@ -1678,30 +1680,34 @@
#endif
#ifdef HAVE_BOOTXX_xFS
- /* check if we have boot code for the root partition type */
- bootxx = bootxx_name(install);
- if (bootxx != NULL) {
- rv = access(bootxx, R_OK);
- free(bootxx);
- } else
- rv = -1;
- if (rv != 0) {
- hit_enter_to_continue(NULL, MSG_No_Bootcode);
- return false;
+ if (MD_NEED_BOOTBLOCK(install)) {
+ /* check if we have boot code for the root partition type */
+ bootxx = bootxx_name(install);
+ if (bootxx != NULL) {
+ rv = access(bootxx, R_OK);
+ free(bootxx);
+ } else
+ rv = -1;
+ if (rv != 0) {
+ hit_enter_to_continue(NULL, MSG_No_Bootcode);
+ return false;
+ }
}
#endif
#ifndef HAVE_UFS2_BOOT
- for (i = 0; i < install->num; i++) {
- if (install->infos[i].type != PT_root)
- continue;
- if (strcmp(install->infos[i].mount, "/") != 0)
- continue;
- if (install->infos[i].fs_type != FS_BSDFFS)
- continue;
- if (install->infos[i].fs_version != 2)
- continue;
- hit_enter_to_continue(NULL, MSG_cannot_ufs2_root);
- return false;
+ if (MD_NEED_BOOTBLOCK(install)) {
+ for (i = 0; i < install->num; i++) {
+ if (install->infos[i].type != PT_root)
+ continue;
+ if (strcmp(install->infos[i].mount, "/") != 0)
+ continue;
+ if (install->infos[i].fs_type != FS_BSDFFS)
+ continue;
+ if (install->infos[i].fs_version != 2)
+ continue;
+ hit_enter_to_continue(NULL, MSG_cannot_ufs2_root);
+ return false;
+ }
}
#endif
Home |
Main Index |
Thread Index |
Old Index