Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/usr.sbin/sysinst Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/ec00b6dacedb
branches:  netbsd-9
changeset: 964161:ec00b6dacedb
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Oct 15 19:36:50 2020 +0000

description:
Pull up following revision(s) (requested by martin in ticket #1113):
        usr.sbin/sysinst/bsddisklabel.c: revision 1.46
        usr.sbin/sysinst/bsddisklabel.c: revision 1.47
        usr.sbin/sysinst/disklabel.c: revision 1.40
        usr.sbin/sysinst/arch/cobalt/md.c: revision 1.13
        usr.sbin/sysinst/bsddisklabel.c: revision 1.48
        usr.sbin/sysinst/disklabel.c: revision 1.41
        usr.sbin/sysinst/arch/cobalt/md.c: revision 1.14
        usr.sbin/sysinst/bsddisklabel.c: revision 1.49
        usr.sbin/sysinst/disklabel.c: revision 1.42
        usr.sbin/sysinst/Makefile.inc: revision 1.34
        usr.sbin/sysinst/disks.c: revision 1.70
        usr.sbin/sysinst/arch/hp300/md.c: revision 1.11
        usr.sbin/sysinst/disks.c: revision 1.71
        usr.sbin/sysinst/arch/i386/md.h: revision 1.8
        usr.sbin/sysinst/arch/arc/md.c: revision 1.13
        usr.sbin/sysinst/mbr.h: revision 1.5
        usr.sbin/sysinst/mbr.h: revision 1.6
        usr.sbin/sysinst/arch/mac68k/md.c: revision 1.10
        usr.sbin/sysinst/bsddisklabel.c: revision 1.50
        usr.sbin/sysinst/arch/acorn32/md.c: revision 1.7
        usr.sbin/sysinst/bsddisklabel.c: revision 1.51
        usr.sbin/sysinst/bsddisklabel.c: revision 1.52
        usr.sbin/sysinst/bsddisklabel.c: revision 1.53
        usr.sbin/sysinst/bsddisklabel.c: revision 1.54
        usr.sbin/sysinst/bsddisklabel.c: revision 1.55
        usr.sbin/sysinst/bsddisklabel.c: revision 1.56
        usr.sbin/sysinst/arch/dummy/md.c: revision 1.6
        usr.sbin/sysinst/arch/amd64/md.h: revision 1.9
        usr.sbin/sysinst/arch/evbsh3/md.c: revision 1.6
        usr.sbin/sysinst/arch/sparc/md.c: revision 1.6
        usr.sbin/sysinst/arch/zaurus/md.c: revision 1.10
        usr.sbin/sysinst/arch/x68k/md.c: revision 1.11
        usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.9
        usr.sbin/sysinst/arch/vax/md.c: revision 1.7
        usr.sbin/sysinst/arch/luna68k/md.c: revision 1.9
        usr.sbin/sysinst/gpt.c: revision 1.19
        usr.sbin/sysinst/arch/i386/md.c: revision 1.31
        usr.sbin/sysinst/arch/i386/md.c: revision 1.32
        usr.sbin/sysinst/arch/evbarm/md.c: revision 1.17
        usr.sbin/sysinst/arch/evbarm/md.c: revision 1.18
        usr.sbin/sysinst/arch/evbarm/md.c: revision 1.19
        usr.sbin/sysinst/arch/shark/md.c: revision 1.6
        usr.sbin/sysinst/arch/landisk/md.c: revision 1.14
        usr.sbin/sysinst/util.c: revision 1.43
        usr.sbin/sysinst/gpt.c: revision 1.20
        usr.sbin/sysinst/util.c: revision 1.44
        usr.sbin/sysinst/gpt.c: revision 1.21
        usr.sbin/sysinst/gpt.c: revision 1.22
        usr.sbin/sysinst/arch/evbarm/msg.md.en: revision 1.2
        usr.sbin/sysinst/arch/ofppc/md.c: revision 1.11
        usr.sbin/sysinst/util.c: revision 1.46
        usr.sbin/sysinst/arch/ofppc/md.c: revision 1.12
        usr.sbin/sysinst/util.c: revision 1.47
        usr.sbin/sysinst/arch/evbarm/md.h: revision 1.6
        usr.sbin/sysinst/util.c: revision 1.48
        usr.sbin/sysinst/arch/evbarm/md.h: revision 1.7
        usr.sbin/sysinst/arch/evbmips/md.c: revision 1.9
        usr.sbin/sysinst/msg.mi.fr: revision 1.28
        usr.sbin/sysinst/msg.mi.fr: revision 1.29
        usr.sbin/sysinst/arch/sgimips/md.c: revision 1.9
        usr.sbin/sysinst/arch/evbarm/Makefile: revision 1.3
        usr.sbin/sysinst/msg.mi.de: revision 1.23
        usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.10
        usr.sbin/sysinst/msg.mi.de: revision 1.24
        usr.sbin/sysinst/install.c: revision 1.15
        usr.sbin/sysinst/install.c: revision 1.16
        usr.sbin/sysinst/arch/sparc64/md.c: revision 1.6
        usr.sbin/sysinst/install.c: revision 1.17
        usr.sbin/sysinst/install.c: revision 1.18
        usr.sbin/sysinst/partitions.h: revision 1.16
        usr.sbin/sysinst/install.c: revision 1.19
        usr.sbin/sysinst/partitions.h: revision 1.17
        usr.sbin/sysinst/arch/evbppc/md.c: revision 1.9
        usr.sbin/sysinst/arch/playstation2/md.c: revision 1.9
        usr.sbin/sysinst/partitions.h: revision 1.18
        usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.9
        usr.sbin/sysinst/partitions.h: revision 1.19
        usr.sbin/sysinst/msg.mi.es: revision 1.24
        usr.sbin/sysinst/msg.mi.es: revision 1.25
        usr.sbin/sysinst/msg.mi.es: revision 1.26
        usr.sbin/sysinst/arch/zaurus/md.c: revision 1.9
        usr.sbin/sysinst/target.c: revision 1.13
        usr.sbin/sysinst/target.c: revision 1.14
        usr.sbin/sysinst/part_edit.c: revision 1.17
        usr.sbin/sysinst/part_edit.c: revision 1.18
        usr.sbin/sysinst/msg.mi.fr: revision 1.30
        usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.11
        usr.sbin/sysinst/part_edit.c: revision 1.19
        usr.sbin/sysinst/msg.mi.fr: revision 1.31
        usr.sbin/sysinst/arch/alpha/md.c: revision 1.9
        usr.sbin/sysinst/msg.mi.en: revision 1.30
        usr.sbin/sysinst/defs.h: revision 1.56
        usr.sbin/sysinst/msg.mi.en: revision 1.31
        usr.sbin/sysinst/defs.h: revision 1.57
        usr.sbin/sysinst/msg.mi.en: revision 1.32
        usr.sbin/sysinst/arch/amiga/md.c: revision 1.6
        usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.9
        usr.sbin/sysinst/defs.h: revision 1.58
        usr.sbin/sysinst/arch/cats/md.c: revision 1.5
        usr.sbin/sysinst/defs.h: revision 1.59
        usr.sbin/sysinst/arch/newsmips/md.c: revision 1.6
        usr.sbin/sysinst/arch/pmax/md.c: revision 1.8
        usr.sbin/sysinst/arch/mipsco/md.c: revision 1.8
        usr.sbin/sysinst/part_edit.c: revision 1.20
        usr.sbin/sysinst/part_edit.c: revision 1.21
        usr.sbin/sysinst/arch/macppc/md.c: revision 1.6
        usr.sbin/sysinst/part_edit.c: revision 1.22
        usr.sbin/sysinst/part_edit.c: revision 1.23
        usr.sbin/sysinst/part_edit.c: revision 1.24
        usr.sbin/sysinst/defs.h: revision 1.60
        usr.sbin/sysinst/arch/mac68k/Makefile: revision 1.3
        usr.sbin/sysinst/defs.h: revision 1.61
        usr.sbin/sysinst/defs.h: revision 1.63
        usr.sbin/sysinst/defs.h: revision 1.64
        usr.sbin/sysinst/defs.h: revision 1.65
        usr.sbin/sysinst/label.c: revision 1.21
        usr.sbin/sysinst/defs.h: revision 1.66
        usr.sbin/sysinst/label.c: revision 1.22
        usr.sbin/sysinst/defs.h: revision 1.67
        usr.sbin/sysinst/label.c: revision 1.23
        usr.sbin/sysinst/label.c: revision 1.24
        usr.sbin/sysinst/label.c: revision 1.25
        usr.sbin/sysinst/label.c: revision 1.26
        usr.sbin/sysinst/label.c: revision 1.27
        usr.sbin/sysinst/msg.mi.pl: revision 1.31
        usr.sbin/sysinst/label.c: revision 1.28
        usr.sbin/sysinst/msg.mi.pl: revision 1.32
        usr.sbin/sysinst/label.c: revision 1.29
        usr.sbin/sysinst/arch/atari/md.c: revision 1.7
        usr.sbin/sysinst/disklabel.c: revision 1.36
        usr.sbin/sysinst/disklabel.c: revision 1.37
        usr.sbin/sysinst/disklabel.c: revision 1.38
        usr.sbin/sysinst/disklabel.c: revision 1.39
        usr.sbin/sysinst/arch/bebox/md.c: revision 1.9
        usr.sbin/sysinst/mbr.c: revision 1.32
        usr.sbin/sysinst/disks.c: revision 1.66
        usr.sbin/sysinst/mbr.c: revision 1.33
        usr.sbin/sysinst/disks.c: revision 1.67
        usr.sbin/sysinst/mbr.c: revision 1.34
        usr.sbin/sysinst/arch/emips/md.c: revision 1.9
        usr.sbin/sysinst/disks.c: revision 1.68
        usr.sbin/sysinst/partitions.c: revision 1.11
        usr.sbin/sysinst/mbr.c: revision 1.35
        usr.sbin/sysinst/disks.c: revision 1.69
        usr.sbin/sysinst/mbr.c: revision 1.36
        usr.sbin/sysinst/arch/hppa/md.c: revision 1.8
        usr.sbin/sysinst/arch/prep/md.c: revision 1.13
        usr.sbin/sysinst/label.c: revision 1.30
        usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.7
        usr.sbin/sysinst/main.c: revision 1.21
        usr.sbin/sysinst/main.c: revision 1.22
        usr.sbin/sysinst/main.c: revision 1.23
        usr.sbin/sysinst/bsddisklabel.c: revision 1.40
        usr.sbin/sysinst/main.c: revision 1.24
        usr.sbin/sysinst/arch/cobalt/md.h: revision 1.6
        usr.sbin/sysinst/bsddisklabel.c: revision 1.41
        usr.sbin/sysinst/main.c: revision 1.25
        usr.sbin/sysinst/arch/news68k/md.c: revision 1.7
        usr.sbin/sysinst/bsddisklabel.c: revision 1.42
        usr.sbin/sysinst/bsddisklabel.c: revision 1.43
        usr.sbin/sysinst/bsddisklabel.c: revision 1.44
        usr.sbin/sysinst/bsddisklabel.c: revision 1.45
Use strlcpy in a few places to guarnatee 0-terminated strings
Rever previous: the d_packname in struct disklabel is not NUL terminated.
Disable the warning instead.
Do not force -Os optimization (unless SMALLPROG)
Remove unused "rel" global variable and make the -r option a no-op.
PR 55045: strlcpy(NULL, ..., 0) considered harmfull in some implementations.
PR misc/54886: bump threshold for automatic/default creation of a tmpfs /tmp
up slightly (to 384 MB ram). This will make sure the default install has
a > 64 MB /tmp available (number pulled out of thin air, 64 MB is the minimum
required by the ZFS tests).
Don't depend on common symbol definitions.
boardype should not be common.
Redo the root-size-limit check again after we grew the root partition
for kernel dumps. Auto-enable the /usr partition if it overflows.
For all non-root partitions, default to FFSv2.
When extending a partition (to fill the total disk size) do respect
size limits.
Do not suggest a size limited partition for extension by default.
Minor tweak to previous: when forcing a /usr partition just to have an
arbitrary extendable partition, still use its default size initially.
At the end of a new installation save entropy.
Ooops, backout previous - twice the entropy saving is not needed.
Instead slightly improve the (slightly) hidden other code that already
did it.
PR 55202: disable swapping if we started it due to low ram
it's "its"
Remove "If you booted from a floppy" message
Set HAVE_INSTALL_IMAGE for evbarm
Change mountpoint of boot ext2fs from /stand to /ext2 to avoid conflict.
Should be pulled up to netbsd-9, with fixes of PR/55060.
MBR type for Ext2 should be MBR_PTYPE_LNXEXT2, not MBR_PTYPE_FAT12.
Silence -Wstringop-truncation for ``name'' in disp_selected_part().
This variable is used only for display, and truncation seems harmless.
PR 55572: avoid crash when answering the mount point prompt for a previously
empty mount point with an emptry sting.
When adding a new partition in the concrete partition editor, make sure
to set a pointer to the partition table interface in the new entry.
Otherwise we may end up not writing back the partitions at all, leading
to further fallout later.
Receipe to reproduce the issue from Frederic Fauberteau, thanks!
In the concrete partitions editor, after deleting the last partition move
the menu selection to the "add a partition" entry (instead of the sentinel
line which is not an active menu entry).
Typo in comment
Keep a list of all partition tables from which we have deleted partitions
and make sure we update those partition tables when writing partitions,
even if no install related partition remains on them.
Fix display of timezone selection menu
If there is no current partitioning manager assume we are editing the
current system and make target_already_root() return true.
Fixes various fallout when using sysinst post installation.
PR 55377: mark boot partitions in the partition size display, as suggested
by Izumi Tsutsui (minor modifications + all bugs by me)
PR 55378: do not assume RAW_PART to be either 2 or 3
PR 55379: avoid creating bogus /etc/fstab lines for /dev/cd* if no
cdrom is available.
PR 55381: try to deal with moved (but not yet saved) partitions when
calculating free space
Apply patch provided by Izumi Tsutsui in PR 55382: make ext2 partitions
show up in the outer (MBR) partition table, needed for example on Cobalt
where firmware boots from that partition.
PR 55384: detangle pm->ptstart from the "install" flag (selecting a
target partition). Instead introduce a new PTI_INSTALL_TARGET per partition
flag and deal with it in the partitioning backends.
Honour pm->ptstart when allocating new partitions - it is supposed to be
the first sector usable by NetBSD.
If we have no explicitly marke target root partition, make sure to set
the proper flag on the implicit one.
When merging existing partitions with desired target system layout
information, only force the "mount" flag if the existing partitions
has a valid mount point.
Add a heuristic to detect and properly mark EFI system partitions
when re-using pre-existing partitions.
When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.
Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.
Simplify/fix a few rounding calculations.
When creating new partitions for "full disk" use, pass a install target
hint to the partitioning backend (for the outer NetBSD partition).
Use an install target hint to mark a new partition active.
When compiled with BOOTSEL support, also name the new partition "NetBSD".
Remove more pm->ptstart abuse - calculate values localy where needed
instead.
Fix editing start and size of not yet existing outer partitions.
Previously we abused pm->ptstart / pm->ptsize to pass the bounds of the
NetBSD outer partition to the inner partition editor - but now this is
not a valid assumption any more, so explicitly fix the bounds if an
outer partition exists.
Remove very strange code that special-cased MSDOS file systems and refused
to newfs the partition (despite explicit request to do so) if it was
mountable.
Accidently carried over from a dim and distant past, before we had
fsck_newfs.
PR 55536: when we find existing partition tables and have alternative
formats available, offer to delete partitions and create new ones from
scratch (in some other or the same on-disk format).
Minor fix to previous: fix condition when we offer the partition type
switch - it makes sense even if the disk is partitioned but has no valid
partitions.
Before forcing MBR partitions into our disklabel, make sure they are not
there yet - could happen in various paths when reusing existing partitions
(or parts of that) - previously we would blindly duplicate identical
partitions.
Ooops, part of previous was not meant to be included yet
When renumbering partitions (after deletions) be slightly more lax
in matching, to cope with differences between MBR EFI partitions and
disklabel MSDOS partitions.
PR 55142: on popular demand bring back expert options to adjust the
number of free inodes, block size and fragment size for FFS and LFS.
Fix copy & pasto noticed by Jason Mitchell: change the type of a GPT
partition via "gpt type" - not "gpt label".
Fix copy & pasto (missing "again" label)
Remove dead code
Move MBR writing (if any) post disklabel writing, otherwise strange
interactions happen.
Properly convert partition default sizes in MB to number of sectors

diffstat:

 usr.sbin/sysinst/Makefile.inc           |    8 +-
 usr.sbin/sysinst/arch/acorn32/md.c      |    4 +-
 usr.sbin/sysinst/arch/alpha/md.c        |    4 +-
 usr.sbin/sysinst/arch/amd64/md.h        |    5 +-
 usr.sbin/sysinst/arch/amiga/md.c        |    4 +-
 usr.sbin/sysinst/arch/arc/md.c          |   16 +-
 usr.sbin/sysinst/arch/atari/md.c        |    4 +-
 usr.sbin/sysinst/arch/bebox/md.c        |   16 +-
 usr.sbin/sysinst/arch/cats/md.c         |    4 +-
 usr.sbin/sysinst/arch/cobalt/md.c       |   18 +-
 usr.sbin/sysinst/arch/cobalt/md.h       |    4 +-
 usr.sbin/sysinst/arch/dummy/md.c        |    4 +-
 usr.sbin/sysinst/arch/emips/md.c        |    4 +-
 usr.sbin/sysinst/arch/evbarm/Makefile   |    4 +-
 usr.sbin/sysinst/arch/evbarm/md.c       |   55 +++-
 usr.sbin/sysinst/arch/evbarm/md.h       |    6 +-
 usr.sbin/sysinst/arch/evbarm/msg.md.en  |    4 +-
 usr.sbin/sysinst/arch/evbmips/md.c      |   16 +-
 usr.sbin/sysinst/arch/evbppc/md.c       |   16 +-
 usr.sbin/sysinst/arch/evbsh3/md.c       |    4 +-
 usr.sbin/sysinst/arch/ews4800mips/md.c  |    4 +-
 usr.sbin/sysinst/arch/hp300/md.c        |    4 +-
 usr.sbin/sysinst/arch/hpcarm/md.c       |   16 +-
 usr.sbin/sysinst/arch/hpcmips/md.c      |   16 +-
 usr.sbin/sysinst/arch/hpcsh/md.c        |   16 +-
 usr.sbin/sysinst/arch/hppa/md.c         |    4 +-
 usr.sbin/sysinst/arch/i386/md.c         |   43 ++-
 usr.sbin/sysinst/arch/i386/md.h         |    4 +-
 usr.sbin/sysinst/arch/landisk/md.c      |   16 +-
 usr.sbin/sysinst/arch/luna68k/md.c      |    4 +-
 usr.sbin/sysinst/arch/mac68k/Makefile   |    5 +-
 usr.sbin/sysinst/arch/mac68k/md.c       |   14 +-
 usr.sbin/sysinst/arch/macppc/md.c       |    4 +-
 usr.sbin/sysinst/arch/mipsco/md.c       |    4 +-
 usr.sbin/sysinst/arch/mvme68k/md.c      |    4 +-
 usr.sbin/sysinst/arch/news68k/md.c      |    4 +-
 usr.sbin/sysinst/arch/newsmips/md.c     |    4 +-
 usr.sbin/sysinst/arch/ofppc/md.c        |   16 +-
 usr.sbin/sysinst/arch/playstation2/md.c |   17 +-
 usr.sbin/sysinst/arch/pmax/md.c         |    4 +-
 usr.sbin/sysinst/arch/prep/md.c         |   16 +-
 usr.sbin/sysinst/arch/sandpoint/md.c    |   16 +-
 usr.sbin/sysinst/arch/sgimips/md.c      |    4 +-
 usr.sbin/sysinst/arch/shark/md.c        |    4 +-
 usr.sbin/sysinst/arch/sparc/md.c        |    4 +-
 usr.sbin/sysinst/arch/sparc64/md.c      |    4 +-
 usr.sbin/sysinst/arch/vax/md.c          |    4 +-
 usr.sbin/sysinst/arch/x68k/md.c         |    4 +-
 usr.sbin/sysinst/arch/zaurus/md.c       |   16 +-
 usr.sbin/sysinst/bsddisklabel.c         |  362 +++++++++++++++++++++++++------
 usr.sbin/sysinst/defs.h                 |  135 +++++++----
 usr.sbin/sysinst/disklabel.c            |   84 ++++++-
 usr.sbin/sysinst/disks.c                |   89 ++++--
 usr.sbin/sysinst/gpt.c                  |   47 +++-
 usr.sbin/sysinst/install.c              |   50 ++-
 usr.sbin/sysinst/label.c                |  246 +++++++++++++++++---
 usr.sbin/sysinst/main.c                 |   52 ++++-
 usr.sbin/sysinst/mbr.c                  |   88 ++++++-
 usr.sbin/sysinst/mbr.h                  |    7 +-
 usr.sbin/sysinst/msg.mi.de              |   46 ++-
 usr.sbin/sysinst/msg.mi.en              |   40 ++-
 usr.sbin/sysinst/msg.mi.es              |   40 ++-
 usr.sbin/sysinst/msg.mi.fr              |   42 ++-
 usr.sbin/sysinst/msg.mi.pl              |   38 ++-
 usr.sbin/sysinst/part_edit.c            |  124 +++++-----
 usr.sbin/sysinst/partitions.c           |   10 +-
 usr.sbin/sysinst/partitions.h           |   19 +-
 usr.sbin/sysinst/target.c               |   11 +-
 usr.sbin/sysinst/util.c                 |   59 +++-
 69 files changed, 1513 insertions(+), 551 deletions(-)

diffs (truncated from 5076 to 300 lines):

diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc     Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/Makefile.inc     Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.22.2.2 2019/12/17 09:48:30 msaitoh Exp $
+#      $NetBSD: Makefile.inc,v 1.22.2.3 2020/10/15 19:36:50 bouyer Exp $
 #
 # Makefile for sysinst
 
@@ -119,10 +119,10 @@
 .endif
 CPPFLAGS+=-DDEBUG
 DBG +=-g -O0 ${O0TRACKING}
+.else
+.if defined(SMALLPROG)
+COPTS += -Os
 .endif
-
-.if empty(DBG:M-g)
-COPTS += -Os
 .endif
 
 .if (!defined(SMALLPROG) || defined(SMALLPROG_INET6)) && (${USE_INET6} != "no")
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/acorn32/md.c
--- a/usr.sbin/sysinst/arch/acorn32/md.c        Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/acorn32/md.c        Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.5 2019/07/13 17:13:36 martin Exp $ */
+/*     $NetBSD: md.c,v 1.5.2.1 2020/10/15 19:36:51 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -202,7 +202,7 @@
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return make_bsd_partitions(install);
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/alpha/md.c
--- a/usr.sbin/sysinst/arch/alpha/md.c  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/alpha/md.c  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.6.2.2 2020/03/09 18:50:19 snj Exp $ */
+/*     $NetBSD: md.c,v 1.6.2.3 2020/10/15 19:36:54 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -104,7 +104,7 @@
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return make_bsd_partitions(install);
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/amd64/md.h
--- a/usr.sbin/sysinst/arch/amd64/md.h  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/amd64/md.h  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.h,v 1.6.2.2 2019/11/17 13:45:26 msaitoh Exp $       */
+/*     $NetBSD: md.h,v 1.6.2.3 2020/10/15 19:36:52 bouyer Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -128,3 +128,6 @@
 /* post-process boot.cfg for KASLR if that kernel has been selected */
 void amd64_md_boot_cfg_finalize(const char*);
 #define        MD_BOOT_CFG_FINALIZE(P) amd64_md_boot_cfg_finalize(P)
+
+#define        HAVE_EFI_BOOT           1       /* we support EFI boot partitions */
+
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/amiga/md.c
--- a/usr.sbin/sysinst/arch/amiga/md.c  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/amiga/md.c  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.5 2019/07/13 17:13:36 martin Exp $ */
+/*     $NetBSD: md.c,v 1.5.2.1 2020/10/15 19:36:54 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -65,7 +65,7 @@
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return 1;
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c    Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c    Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8.2.3 2020/01/28 10:17:57 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.4 2020/10/15 19:36:51 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -65,10 +65,12 @@
 bool
 md_get_info(struct install_partition_desc *install)
 {
+       int res;
 
        if (pm->no_mbr || pm->no_part)
                return true;
 
+again:
        if (pm->parts == NULL) {
 
                const struct disk_partitioning_scheme *ps =
@@ -88,13 +90,21 @@
                        pm->dlsize = ps->size_limit;
        }
 
-       return set_bios_geom_with_mbr_guess(pm->parts);
+       res = set_bios_geom_with_mbr_guess(pm->parts);
+       if (res == 0)
+               return false;
+       else if (res == 1)
+               return true;
+
+       pm->parts->pscheme->destroy_part_scheme(pm->parts);
+       pm->parts = NULL;
+       goto again;
 }
 
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
 
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/atari/md.c
--- a/usr.sbin/sysinst/arch/atari/md.c  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/atari/md.c  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.6 2019/07/13 17:13:36 martin Exp $ */
+/*     $NetBSD: md.c,v 1.6.2.1 2020/10/15 19:36:55 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -65,7 +65,7 @@
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        msg_fmt_display(MSG_infoahdilabel, "%s", pm->diskdev);
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/bebox/md.c
--- a/usr.sbin/sysinst/arch/bebox/md.c  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/bebox/md.c  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.5.2.2 2020/01/28 10:17:59 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.5.2.3 2020/10/15 19:36:55 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,10 +58,12 @@
 bool
 md_get_info(struct install_partition_desc *install)
 {
+       int res;
 
        if (pm->no_mbr || pm->no_part)
                return true;
 
+again:
        if (pm->parts == NULL) {
 
                const struct disk_partitioning_scheme *ps =
@@ -81,13 +83,21 @@
                        pm->dlsize = ps->size_limit;
        }
 
-       return set_bios_geom_with_mbr_guess(pm->parts);
+       res = set_bios_geom_with_mbr_guess(pm->parts);
+       if (res == 0)
+               return false;
+       else if (res == 1)
+               return true;
+
+       pm->parts->pscheme->destroy_part_scheme(pm->parts);
+       pm->parts = NULL;
+       goto again;
 }
 
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return make_bsd_partitions(install);
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/cats/md.c
--- a/usr.sbin/sysinst/arch/cats/md.c   Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/cats/md.c   Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.4 2019/07/13 17:13:36 martin Exp $ */
+/*     $NetBSD: md.c,v 1.4.2.1 2020/10/15 19:36:54 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -123,7 +123,7 @@
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return make_bsd_partitions(install);
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8.2.3 2020/01/28 10:17:57 msaitoh Exp $ */
+/*     $NetBSD: md.c,v 1.8.2.4 2020/10/15 19:36:51 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -65,10 +65,12 @@
 bool
 md_get_info(struct install_partition_desc *install)
 {
+       int res;
 
        if (pm->no_mbr || pm->no_part)
                return true;
 
+again:
        if (pm->parts == NULL) {
 
                const struct disk_partitioning_scheme *ps =
@@ -88,13 +90,21 @@
                        pm->dlsize = ps->size_limit;
        }
 
-       return set_bios_geom_with_mbr_guess(pm->parts);
+       res = set_bios_geom_with_mbr_guess(pm->parts);
+       if (res == 0)
+               return false;
+       else if (res == 1)
+               return true;
+
+       pm->parts->pscheme->destroy_part_scheme(pm->parts);
+       pm->parts = NULL;
+       goto again;
 }
 
 /*
  * md back-end code for menu-driven BSD disklabel editor.
  */
-bool
+int
 md_make_bsd_partitions(struct install_partition_desc *install)
 {
        return make_bsd_partitions(install);
@@ -281,7 +291,7 @@
        struct disk_part_info boot_part = {
                .size = PART_BOOT / 512,
                .fs_type = PART_BOOT_TYPE,
-               .fs_sub_type = MBR_PTYPE_FAT12,
+               .fs_sub_type = MBR_PTYPE_LNXEXT2,
                .last_mounted = PART_BOOT_MOUNT,
        };
 
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/cobalt/md.h
--- a/usr.sbin/sysinst/arch/cobalt/md.h Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.h Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.h,v 1.3.2.2 2019/12/17 09:44:51 msaitoh Exp $       */
+/*     $NetBSD: md.h,v 1.3.2.3 2020/10/15 19:36:51 bouyer Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -49,7 +49,7 @@
 #define PART_BOOT_MIN          (1 * 1024 * 1024)       /* 1MB minimum */
 #define        PART_BOOT_TYPE          FS_EX2FS
 #define        PART_BOOT_SUBT          1                       /* use "old" ext2 */
-#define        PART_BOOT_MOUNT         "/stand"
+#define        PART_BOOT_MOUNT         "/ext2"
 
 /* default partition size */
 #define DEFSWAPRAM     32      /* Assume at least this RAM for swap calc */
diff -r 00d3b899d517 -r ec00b6dacedb usr.sbin/sysinst/arch/dummy/md.c
--- a/usr.sbin/sysinst/arch/dummy/md.c  Thu Oct 15 12:07:11 2020 +0000
+++ b/usr.sbin/sysinst/arch/dummy/md.c  Thu Oct 15 19:36:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.5 2019/07/13 17:13:37 martin Exp $    */
+/*     $NetBSD: md.c,v 1.5.2.1 2020/10/15 19:36:51 bouyer Exp $        */



Home | Main Index | Thread Index | Old Index