CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: msaitoh Date: Tue Nov 19 06:19:04 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #443): usr.sbin/sysinst/arch/i386/md.c: revision 1.25 usr.sbin/sysinst/arch/i386/md.c: revision 1.26 Fix previous: the install medium may not have /usr/mdec/prekern; it was meant to copy the one from the just installed system. Fix previous: not a good idea to try to copy files from the not yet extracted sets. To generate a diff of this commit: cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/usr.sbin/sysinst/arch/i386/md.c 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/arch/i386/md.c diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.2 src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.3 --- src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.2 Sun Nov 17 13:45:26 2019 +++ src/usr.sbin/sysinst/arch/i386/md.c Tue Nov 19 06:19:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.20.2.2 2019/11/17 13:45:26 msaitoh Exp $ */ +/* $NetBSD: md.c,v 1.20.2.3 2019/11/19 06:19:04 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -376,13 +376,6 @@ md_post_newfs_uefi(struct install_partit int md_post_newfs(struct install_partition_desc *install) { -#if defined(__amd64__) - int ret; - - ret = cp_to_target("/usr/mdec/prekern", "/prekern"); - if (ret) - return ret; -#endif return uefi_boot ? md_post_newfs_uefi(install) : md_post_newfs_bios(install); @@ -391,6 +384,15 @@ md_post_newfs(struct install_partition_d int md_post_extract(struct install_partition_desc *install) { +#if defined(__amd64__) + if (get_kernel_set() == SET_KERNEL_2) { + int ret; + + ret = cp_within_target("/usr/mdec/prekern", "/prekern", 0); + if (ret) + return ret; + } +#endif return 0; }
CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/i386
Module Name:src Committed By: msaitoh Date: Tue Nov 19 06:19:04 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #443): usr.sbin/sysinst/arch/i386/md.c: revision 1.25 usr.sbin/sysinst/arch/i386/md.c: revision 1.26 Fix previous: the install medium may not have /usr/mdec/prekern; it was meant to copy the one from the just installed system. Fix previous: not a good idea to try to copy files from the not yet extracted sets. To generate a diff of this commit: cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/usr.sbin/sysinst/arch/i386/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Nov 17 13:45:26 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: Makefile.inc bsddisklabel.c configmenu.c defs.h disklabel.c disks.c gpt.c install.c label.c main.c mbr.c mbr.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl net.c part_edit.c partitions.c partitions.h partman.c run.c util.c src/usr.sbin/sysinst/arch/amd64 [netbsd-9]: md.c md.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: Makefile src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c menus.md msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: Pull up following revision(s) (requested by martin in ticket #436): usr.sbin/sysinst/disks.c: revision 1.55 usr.sbin/sysinst/msg.mi.en: revision 1.24 usr.sbin/sysinst/mbr.c: revision 1.22 usr.sbin/sysinst/disks.c: revision 1.56 usr.sbin/sysinst/msg.mi.en: revision 1.25 usr.sbin/sysinst/disks.c: revision 1.57 usr.sbin/sysinst/arch/playstation2/msg.md.pl: revision 1.3 usr.sbin/sysinst/Makefile.inc: revision 1.30 usr.sbin/sysinst/configmenu.c: revision 1.11 usr.sbin/sysinst/util.c: revision 1.35 usr.sbin/sysinst/gpt.c: revision 1.12 usr.sbin/sysinst/util.c: revision 1.36 usr.sbin/sysinst/arch/playstation2/msg.md.de: revision 1.3 usr.sbin/sysinst/arch/i386/menus.md: revision 1.3 usr.sbin/sysinst/util.c: revision 1.37 usr.sbin/sysinst/part_edit.c: revision 1.11 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.2 usr.sbin/sysinst/util.c: revision 1.38 usr.sbin/sysinst/part_edit.c: revision 1.12 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.3 usr.sbin/sysinst/util.c: revision 1.39 usr.sbin/sysinst/part_edit.c: revision 1.13 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.4 usr.sbin/sysinst/disklabel.c: revision 1.15 usr.sbin/sysinst/bsddisklabel.c: revision 1.30 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.2 usr.sbin/sysinst/bsddisklabel.c: revision 1.31 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.4 usr.sbin/sysinst/mbr.h: revision 1.4 usr.sbin/sysinst/main.c: revision 1.18 usr.sbin/sysinst/partman.c: revision 1.44 usr.sbin/sysinst/msg.mi.de: revision 1.17 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.2 usr.sbin/sysinst/msg.mi.de: revision 1.18 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.3 usr.sbin/sysinst/arch/playstation2/msg.md.en: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.4 usr.sbin/sysinst/arch/amd64/md.c: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/Makefile: revision 1.3 usr.sbin/sysinst/arch/playstation2/msg.md.es: revision 1.3 usr.sbin/sysinst/label.c: revision 1.13 usr.sbin/sysinst/Makefile.inc: revision 1.29 usr.sbin/sysinst/label.c: revision 1.14 usr.sbin/sysinst/util.c: revision 1.40 usr.sbin/sysinst/partitions.c: revision 1.5 usr.sbin/sysinst/arch/amd64/md.h: revision 1.8 usr.sbin/sysinst/msg.mi.es: revision 1.18 usr.sbin/sysinst/net.c: revision 1.34 usr.sbin/sysinst/msg.mi.es: revision 1.19 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.2 usr.sbin/sysinst/arch/i386/md.c: revision 1.22 usr.sbin/sysinst/msg.mi.fr: revision 1.22 usr.sbin/sysinst/arch/playstation2/msg.md.fr: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.3 usr.sbin/sysinst/arch/i386/md.c: revision 1.23 usr.sbin/sysinst/msg.mi.pl: revision 1.25 usr.sbin/sysinst/msg.mi.fr: revision 1.23 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.4 usr.sbin/sysinst/arch/i386/md.c: revision 1.24 usr.sbin/sysinst/partitions.h: revision 1.8 usr.sbin/sysinst/msg.mi.pl: revision 1.26 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.2 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.4 usr.sbin/sysinst/run.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.46 usr.sbin/sysinst/install.c: revision 1.12 usr.sbin/sysinst/defs.h: revision 1.47 usr.sbin/sysinst/install.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.48 Add options to the various partitioning stages that allow cloning of alien partitions (optionally including data). PR 54467: we trust our own sets, extract them with -P to allow symlink redirection (especially for updates and chroot services - back out once a better solution for those is implemented) Make cloning support
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Nov 17 13:45:26 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: Makefile.inc bsddisklabel.c configmenu.c defs.h disklabel.c disks.c gpt.c install.c label.c main.c mbr.c mbr.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl net.c part_edit.c partitions.c partitions.h partman.c run.c util.c src/usr.sbin/sysinst/arch/amd64 [netbsd-9]: md.c md.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: Makefile src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c menus.md msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: msg.md.de msg.md.en msg.md.es msg.md.fr msg.md.pl Log Message: Pull up following revision(s) (requested by martin in ticket #436): usr.sbin/sysinst/disks.c: revision 1.55 usr.sbin/sysinst/msg.mi.en: revision 1.24 usr.sbin/sysinst/mbr.c: revision 1.22 usr.sbin/sysinst/disks.c: revision 1.56 usr.sbin/sysinst/msg.mi.en: revision 1.25 usr.sbin/sysinst/disks.c: revision 1.57 usr.sbin/sysinst/arch/playstation2/msg.md.pl: revision 1.3 usr.sbin/sysinst/Makefile.inc: revision 1.30 usr.sbin/sysinst/configmenu.c: revision 1.11 usr.sbin/sysinst/util.c: revision 1.35 usr.sbin/sysinst/gpt.c: revision 1.12 usr.sbin/sysinst/util.c: revision 1.36 usr.sbin/sysinst/arch/playstation2/msg.md.de: revision 1.3 usr.sbin/sysinst/arch/i386/menus.md: revision 1.3 usr.sbin/sysinst/util.c: revision 1.37 usr.sbin/sysinst/part_edit.c: revision 1.11 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.2 usr.sbin/sysinst/util.c: revision 1.38 usr.sbin/sysinst/part_edit.c: revision 1.12 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.3 usr.sbin/sysinst/util.c: revision 1.39 usr.sbin/sysinst/part_edit.c: revision 1.13 usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.4 usr.sbin/sysinst/disklabel.c: revision 1.15 usr.sbin/sysinst/bsddisklabel.c: revision 1.30 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.2 usr.sbin/sysinst/bsddisklabel.c: revision 1.31 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.4 usr.sbin/sysinst/mbr.h: revision 1.4 usr.sbin/sysinst/main.c: revision 1.18 usr.sbin/sysinst/partman.c: revision 1.44 usr.sbin/sysinst/msg.mi.de: revision 1.17 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.2 usr.sbin/sysinst/msg.mi.de: revision 1.18 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.3 usr.sbin/sysinst/arch/playstation2/msg.md.en: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.4 usr.sbin/sysinst/arch/amd64/md.c: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/Makefile: revision 1.3 usr.sbin/sysinst/arch/playstation2/msg.md.es: revision 1.3 usr.sbin/sysinst/label.c: revision 1.13 usr.sbin/sysinst/Makefile.inc: revision 1.29 usr.sbin/sysinst/label.c: revision 1.14 usr.sbin/sysinst/util.c: revision 1.40 usr.sbin/sysinst/partitions.c: revision 1.5 usr.sbin/sysinst/arch/amd64/md.h: revision 1.8 usr.sbin/sysinst/msg.mi.es: revision 1.18 usr.sbin/sysinst/net.c: revision 1.34 usr.sbin/sysinst/msg.mi.es: revision 1.19 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.2 usr.sbin/sysinst/arch/i386/md.c: revision 1.22 usr.sbin/sysinst/msg.mi.fr: revision 1.22 usr.sbin/sysinst/arch/playstation2/msg.md.fr: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.3 usr.sbin/sysinst/arch/i386/md.c: revision 1.23 usr.sbin/sysinst/msg.mi.pl: revision 1.25 usr.sbin/sysinst/msg.mi.fr: revision 1.23 usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.4 usr.sbin/sysinst/arch/i386/md.c: revision 1.24 usr.sbin/sysinst/partitions.h: revision 1.8 usr.sbin/sysinst/msg.mi.pl: revision 1.26 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.2 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.3 usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.4 usr.sbin/sysinst/run.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.46 usr.sbin/sysinst/install.c: revision 1.12 usr.sbin/sysinst/defs.h: revision 1.47 usr.sbin/sysinst/install.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.48 Add options to the various partitioning stages that allow cloning of alien partitions (optionally including data). PR 54467: we trust our own sets, extract them with -P to allow symlink redirection (especially for updates and chroot services - back out once a better solution for those is implemented) Make cloning support
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Oct 28 02:53:17 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c disks.c part_edit.c partitions.c partitions.h Log Message: Pull up following revision(s) (requested by martin in ticket #382): usr.sbin/sysinst/part_edit.c: revision 1.10 usr.sbin/sysinst/part_edit.c: revision 1.9 usr.sbin/sysinst/partitions.c: revision 1.3 usr.sbin/sysinst/partitions.c: revision 1.4 usr.sbin/sysinst/partitions.h: revision 1.7 usr.sbin/sysinst/bsddisklabel.c: revision 1.29 usr.sbin/sysinst/disks.c: revision 1.54 Honor the "no_mbr" flag (used especially for raid and xbd devices) On device where we do not want a MBR (raid, xbd) skip the MBR partitioning scheme when trying to read partitions from disk. The generic reader will fall back to disklabel then. In non-MBR specific files, #ifdef all tests for MBR for architectures that do not even compile in MBR support. To generate a diff of this commit: cvs rdiff -u -r1.23.2.4 -r1.23.2.5 src/usr.sbin/sysinst/bsddisklabel.c cvs rdiff -u -r1.44.2.9 -r1.44.2.10 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/usr.sbin/sysinst/part_edit.c cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/usr.sbin/sysinst/partitions.c cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/usr.sbin/sysinst/partitions.h 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/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.4 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.5 --- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.4 Wed Oct 23 06:04:44 2019 +++ src/usr.sbin/sysinst/bsddisklabel.c Mon Oct 28 02:53:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.23.2.4 2019/10/23 06:04:44 msaitoh Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.23.2.5 2019/10/28 02:53:17 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1341,7 +1341,7 @@ make_bsd_partitions(struct install_parti return true; if (parts == NULL) { - pscheme = select_part_scheme(pm, NULL, true, NULL); + pscheme = select_part_scheme(pm, NULL, !pm->no_mbr, NULL); if (pscheme == NULL) return false; parts = pscheme->create_new_for_disk(pm->diskdev, Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.9 src/usr.sbin/sysinst/disks.c:1.44.2.10 --- src/usr.sbin/sysinst/disks.c:1.44.2.9 Wed Oct 23 06:30:16 2019 +++ src/usr.sbin/sysinst/disks.c Mon Oct 28 02:53:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.9 2019/10/23 06:30:16 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.10 2019/10/28 02:53:17 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -901,7 +901,8 @@ find_disks(const char *doingwhat, bool a pm_i->parts = partitions_read_disk( pm_i->diskdev, - disk->dd_totsec); + disk->dd_totsec, + disk->dd_no_mbr); } } continue; @@ -929,7 +930,8 @@ find_disks(const char *doingwhat, bool a pm->dlsize = disk->dd_cyl * disk->dd_head * disk->dd_sec; - pm->parts = partitions_read_disk(pm->diskdev, disk->dd_totsec); + pm->parts = partitions_read_disk(pm->diskdev, + disk->dd_totsec, disk->dd_no_mbr); again: @@ -1443,7 +1445,7 @@ find_part_by_name(const char *name, stru if (strcmp(disks[n].dd_name, pm->diskdev) == 0) continue; ps = partitions_read_disk(disks[n].dd_name, - disks[n].dd_totsec); + disks[n].dd_totsec, disks[n].dd_no_mbr); if (ps == NULL) continue; if (ps->pscheme->find_by_name == NULL) Index: src/usr.sbin/sysinst/part_edit.c diff -u src/usr.sbin/sysinst/part_edit.c:1.7.2.1 src/usr.sbin/sysinst/part_edit.c:1.7.2.2 --- src/usr.sbin/sysinst/part_edit.c:1.7.2.1 Mon Oct 28 02:49:12 2019 +++ src/usr.sbin/sysinst/part_edit.c Mon Oct 28 02:53:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: part_edit.c,v 1.7.2.1 2019/10/28 02:49:12 msaitoh Exp $ */ +/* $NetBSD: part_edit.c,v 1.7.2.2 2019/10/28 02:53:17 msaitoh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -1218,6 +1218,10 @@ select_part_scheme( if (bootable && p->have_boot_support != NULL && !p->have_boot_support(dev->diskdev)) continue; +#ifdef HAVE_MBR + if (dev->no_mbr && p->name == MSG_parttype_mbr) + continue; +#endif if (p->size_limit && dev->dlsize > p->size_limit) { char buf[255], hum_lim[5]; Index: src/usr.sbin/sysinst/partitions.c diff -u src/usr.sbin/sysinst/partitions.c:1.1.2.1 src/usr.sbin/sysinst/partitions.c:1.1.2.2 --- src/usr.sbin/sysinst/partitions.c:1.1.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/partitions.c Mon Oct 28 02:53:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: partitions.c,v 1.1.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: partitions.c,v 1.1.2.2 2019/10/28 02:53:17 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Oct 28 02:53:17 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c disks.c part_edit.c partitions.c partitions.h Log Message: Pull up following revision(s) (requested by martin in ticket #382): usr.sbin/sysinst/part_edit.c: revision 1.10 usr.sbin/sysinst/part_edit.c: revision 1.9 usr.sbin/sysinst/partitions.c: revision 1.3 usr.sbin/sysinst/partitions.c: revision 1.4 usr.sbin/sysinst/partitions.h: revision 1.7 usr.sbin/sysinst/bsddisklabel.c: revision 1.29 usr.sbin/sysinst/disks.c: revision 1.54 Honor the "no_mbr" flag (used especially for raid and xbd devices) On device where we do not want a MBR (raid, xbd) skip the MBR partitioning scheme when trying to read partitions from disk. The generic reader will fall back to disklabel then. In non-MBR specific files, #ifdef all tests for MBR for architectures that do not even compile in MBR support. To generate a diff of this commit: cvs rdiff -u -r1.23.2.4 -r1.23.2.5 src/usr.sbin/sysinst/bsddisklabel.c cvs rdiff -u -r1.44.2.9 -r1.44.2.10 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/usr.sbin/sysinst/part_edit.c cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/usr.sbin/sysinst/partitions.c cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/usr.sbin/sysinst/partitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Oct 28 02:49:12 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: part_edit.c Log Message: Pull up following revision(s) (requested by martin in ticket #380): usr.sbin/sysinst/part_edit.c: revision 1.8 When we fail to setup for "all of the disk for NetBSD" report failure, instead of silently aborting the install. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/part_edit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Oct 28 02:49:12 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: part_edit.c Log Message: Pull up following revision(s) (requested by martin in ticket #380): usr.sbin/sysinst/part_edit.c: revision 1.8 When we fail to setup for "all of the disk for NetBSD" report failure, instead of silently aborting the install. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/part_edit.c 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/part_edit.c diff -u src/usr.sbin/sysinst/part_edit.c:1.7 src/usr.sbin/sysinst/part_edit.c:1.7.2.1 --- src/usr.sbin/sysinst/part_edit.c:1.7 Fri Jul 12 18:25:08 2019 +++ src/usr.sbin/sysinst/part_edit.c Mon Oct 28 02:49:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: part_edit.c,v 1.7 2019/07/12 18:25:08 martin Exp $ */ +/* $NetBSD: part_edit.c,v 1.7.2.1 2019/10/28 02:49:12 msaitoh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -1152,8 +1152,10 @@ edit_outer_parts(struct disk_partitions return false; } } - if (!md_parts_use_wholedisk(parts)) + if (!md_parts_use_wholedisk(parts)) { + hit_enter_to_continue(MSG_No_free_space, NULL); return false; + } if (parts->pscheme->post_edit_verify) { return parts->pscheme->post_edit_verify(parts, true) == 2;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Thu Oct 24 16:27:22 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.pl Log Message: Pull up following revision(s) (requested by kamil in ticket #377): usr.sbin/sysinst/msg.mi.pl: revision 1.24 Fix polish translation for sysinst PR install/53870 by Guest01 PR install/53871 by Guest01 patch by Krzysztof Lasocki To generate a diff of this commit: cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/usr.sbin/sysinst/msg.mi.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/msg.mi.pl diff -u src/usr.sbin/sysinst/msg.mi.pl:1.20.2.2 src/usr.sbin/sysinst/msg.mi.pl:1.20.2.3 --- src/usr.sbin/sysinst/msg.mi.pl:1.20.2.2 Sun Aug 18 13:25:21 2019 +++ src/usr.sbin/sysinst/msg.mi.pl Thu Oct 24 16:27:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.pl,v 1.20.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ +/* $NetBSD: msg.mi.pl,v 1.20.2.3 2019/10/24 16:27:21 martin Exp $ */ /* Based on english version: */ /* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */ @@ -75,15 +75,16 @@ message mount_failed message hello {Witaj w sysinst, systemie instalacyjnym NetBSD-@@VERSION@@. -To oparte na menu narzedzie zostalo stworzone aby pomoc ci zainstalowac -NetBSD na twardym dysku, lub zaktualizowac istniejacy system NetBSD, -zuzywajac minimum czasu. W ponizszych menu mozesz zmienic aktualne -ustawienia poprzez naciskanie klawiszy (a, b, c, ...). Klawisze strzalek -takze moga dzialac. Aktywujesz ustawienie poprzez nacisniecie ENTER. +To oparte na menu narzedzie (sysinst) zostalo zaprojektowane w celu +ulatwienia instalacji NetBSD na dysku twardym, lub uaktualnienia istniejacego +systemu NetBSD przy minimalnym nakladzie pracy. W ponizszych menu, aby wybrac +pozycje wpisz litere (a, b, c, ...). Mozesz tez uzyc CTRL+N/CTRL+P, aby wybrac +nastepna/poprzednia pozycje. Klawisze strzalek i Page-up/Page-down takze moga +dzialac. Aby aktywowac biezacy wybor z menu, nacisnij klawisz Enter. } message thanks -{Dziekujemy za uzywanie NetBSD! +{Dziekujemy za wybranie NetBSD! } message installusure @@ -483,8 +484,12 @@ message distset {Dystrybucja NetBSD jest rozbita w kolekcje pakietow dystrybucyjnych. Czesc z nich to pakiety podstawowe wymagane przez wszystkie instalacje, a czesc nie jest przez wszystkie wymagana. Mozesz zainstalowac je -wszystkie (Pelna instalacja) lub wybrac z opcjonalnych pakietow. -} /* XXX add 'minimal installation' */ +wszystkie (Pelna instalacja) lub wybrac z opcjonalnych pakietow. Mozesz +takze zainstalowac tylko podstawowy zestaw (minimalna instalacja), lub +wybrac te, ktore chcesz (Inna instalacja) +} + + message ftpsource {Ponizej masz site %s, katalog, uzytkownika, oraz haslo gotowe do uzycia.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Thu Oct 24 16:27:22 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.pl Log Message: Pull up following revision(s) (requested by kamil in ticket #377): usr.sbin/sysinst/msg.mi.pl: revision 1.24 Fix polish translation for sysinst PR install/53870 by Guest01 PR install/53871 by Guest01 patch by Krzysztof Lasocki To generate a diff of this commit: cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/usr.sbin/sysinst/msg.mi.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:30:16 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #369): usr.sbin/sysinst/disks.c: revision 1.51 PR install/54480: when upgrading a system and re-mounting the target / with proper options, and the installed system does not use NAME= syntax in fstab(5), use the device name we used to get here, instead of the name from fstab, it might be different to what the real system calls the device (compact flash root showing up as wd0 native, but sd? on the card reader used for updating it right now). This is an abuse of the upgrade functionality and in general pretty dangerous when multiple devices are used in the upgraded fstab (e.g. separate /usr), and it used to work more by accident with the old code. However, it is a quite usefull way to upgrade tiny systems with compact flash root, and it used to work - so support it properly (as far as we can). To generate a diff of this commit: cvs rdiff -u -r1.44.2.8 -r1.44.2.9 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:30:16 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #369): usr.sbin/sysinst/disks.c: revision 1.51 PR install/54480: when upgrading a system and re-mounting the target / with proper options, and the installed system does not use NAME= syntax in fstab(5), use the device name we used to get here, instead of the name from fstab, it might be different to what the real system calls the device (compact flash root showing up as wd0 native, but sd? on the card reader used for updating it right now). This is an abuse of the upgrade functionality and in general pretty dangerous when multiple devices are used in the upgraded fstab (e.g. separate /usr), and it used to work more by accident with the old code. However, it is a quite usefull way to upgrade tiny systems with compact flash root, and it used to work - so support it properly (as far as we can). To generate a diff of this commit: cvs rdiff -u -r1.44.2.8 -r1.44.2.9 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.8 src/usr.sbin/sysinst/disks.c:1.44.2.9 --- src/usr.sbin/sysinst/disks.c:1.44.2.8 Wed Oct 23 06:04:44 2019 +++ src/usr.sbin/sysinst/disks.c Wed Oct 23 06:30:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.8 2019/10/23 06:04:44 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.9 2019/10/23 06:30:16 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1487,12 +1487,14 @@ process_found_fs(struct data *list, size const char *fsname = (const char*)item->var; part_id pno; struct disk_partitions *parts; - bool first; + size_t len; + bool first, is_root; if (num < 2 || strstr(list[2].u.s_val, "noauto") != NULL) return 0; - if ((strcmp(list[1].u.s_val, "/") == 0) && target_mounted()) + is_root = strcmp(list[1].u.s_val, "/") == 0; + if (is_root && target_mounted()) return 0; if (strcmp(item->head, name_prefix) == 0) { @@ -1505,11 +1507,36 @@ process_found_fs(struct data *list, size parts->pscheme->get_part_device(parts, pno, rdev, sizeof(rdev), NULL, raw_dev_name, true); } else { - /* plain device name */ - strcpy(rdev, "/dev/r"); - strlcat(rdev, list[0].u.s_val, sizeof(rdev)); - strcpy(dev, "/dev/"); - strlcat(dev, list[0].u.s_val, sizeof(dev)); + /* this fstab entry uses the plain device name */ + if (is_root) { + /* + * PR 54480: we can not use the current device name + * as it might be different from the real environment. + * This is an abuse of the functionality, but it used + * to work before (and still does work if only a single + * target disk is involved). + * Use the device name from the current "pm" instead. + */ + strcpy(rdev, "/dev/r"); + strlcat(rdev, pm->diskdev, sizeof(rdev)); + strcpy(dev, "/dev/"); + strlcat(dev, pm->diskdev, sizeof(dev)); + /* copy over the partition letter, if any */ + len = strlen(list[0].u.s_val); + if (list[0].u.s_val[len-1] >= 'a' && + list[0].u.s_val[len-1] <= + ('a' + getmaxpartitions())) { +strlcat(rdev, [0].u.s_val[len-1], +sizeof(rdev)); +strlcat(dev, [0].u.s_val[len-1], +sizeof(dev)); + } + } else { + strcpy(rdev, "/dev/r"); + strlcat(rdev, list[0].u.s_val, sizeof(rdev)); + strcpy(dev, "/dev/"); + strlcat(dev, list[0].u.s_val, sizeof(dev)); + } } if (with_fsck) {
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:04:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #365): usr.sbin/sysinst/bsddisklabel.c: revision 1.28 usr.sbin/sysinst/disks.c: revision 1.53 Skip unwanted (zero sized) partitions. To generate a diff of this commit: cvs rdiff -u -r1.23.2.3 -r1.23.2.4 src/usr.sbin/sysinst/bsddisklabel.c cvs rdiff -u -r1.44.2.7 -r1.44.2.8 src/usr.sbin/sysinst/disks.c 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/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.3 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.4 --- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.3 Thu Aug 29 06:46:13 2019 +++ src/usr.sbin/sysinst/bsddisklabel.c Wed Oct 23 06:04:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.23.2.3 2019/08/29 06:46:13 msaitoh Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.23.2.4 2019/10/23 06:04:44 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1278,6 +1278,8 @@ apply_settings_to_partitions(struct pm_d for (i = 0; i < wanted->num; i++) { if (wanted->infos[i].cur_part_id != NO_PART) continue; + if (wanted->infos[i].size <= 0) +continue; if (t.start == infos[i].start) { wanted->infos[i].cur_part_id = pno; wanted->infos[i].cur_start = infos[i].start; Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.7 src/usr.sbin/sysinst/disks.c:1.44.2.8 --- src/usr.sbin/sysinst/disks.c:1.44.2.7 Wed Oct 23 05:58:13 2019 +++ src/usr.sbin/sysinst/disks.c Wed Oct 23 06:04:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.7 2019/10/23 05:58:13 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.8 2019/10/23 06:04:44 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1290,6 +1290,9 @@ make_fstab(struct install_partition_desc const struct part_usage_info *ptn = >infos[i]; + if (ptn->size == 0) + continue; + if (ptn->type != PT_swap && (ptn->instflags & PUIINST_MOUNT) == 0) continue;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:04:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #365): usr.sbin/sysinst/bsddisklabel.c: revision 1.28 usr.sbin/sysinst/disks.c: revision 1.53 Skip unwanted (zero sized) partitions. To generate a diff of this commit: cvs rdiff -u -r1.23.2.3 -r1.23.2.4 src/usr.sbin/sysinst/bsddisklabel.c cvs rdiff -u -r1.44.2.7 -r1.44.2.8 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:03:24 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #364): usr.sbin/sysinst/disklabel.c: revision 1.14 When translating (internal) indices to device names, properly deal with gaps in partition allocations (e.g. no swap partition). To generate a diff of this commit: cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/usr.sbin/sysinst/disklabel.c 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/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10.2.3 src/usr.sbin/sysinst/disklabel.c:1.10.2.4 --- src/usr.sbin/sysinst/disklabel.c:1.10.2.3 Sun Aug 18 13:22:49 2019 +++ src/usr.sbin/sysinst/disklabel.c Wed Oct 23 06:03:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10.2.3 2019/08/18 13:22:49 msaitoh Exp $ */ +/* $NetBSD: disklabel.c,v 1.10.2.4 2019/10/23 06:03:24 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -717,6 +717,8 @@ again: continue; if (parts->l.d_partitions[i].p_fstype == FS_UNUSED) continue; + if (parts->l.d_partitions[i].p_size == 0) +continue; s = parts->l.d_partitions[i].p_offset; e = parts->l.d_partitions[i].p_size + s; @@ -823,11 +825,17 @@ disklabel_get_part_device(const struct d if (ptn >= parts->l.d_npartitions) return false; - for (id = part_index = 0; id < ptn && - part_index < parts->l.d_npartitions; part_index++) - if (parts->l.d_partitions[part_index].p_fstype != FS_UNUSED || - parts->l.d_partitions[part_index].p_size != 0) - id++; + for (id = part_index = 0; part_index < parts->l.d_npartitions; + part_index++) { + if (parts->l.d_partitions[part_index].p_fstype == FS_UNUSED && + parts->l.d_partitions[part_index].p_size == 0) + continue; + if (id == ptn) + break; + id++; + if (id > ptn) + return false; + } if (part != 0) *part = part_index;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:03:24 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #364): usr.sbin/sysinst/disklabel.c: revision 1.14 When translating (internal) indices to device names, properly deal with gaps in partition allocations (e.g. no swap partition). To generate a diff of this commit: cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/usr.sbin/sysinst/disklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:01:55 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.en msg.mi.fr Log Message: Pull up following revision(s) (requested by martin in ticket #363): usr.sbin/sysinst/msg.mi.en: revision 1.23 usr.sbin/sysinst/msg.mi.fr: revision 1.21 Sentence begins with capital letter ("yes or no?"). Also add a few french sentences, to make it less awful, but not complete. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/usr.sbin/sysinst/msg.mi.fr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 06:01:55 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.en msg.mi.fr Log Message: Pull up following revision(s) (requested by martin in ticket #363): usr.sbin/sysinst/msg.mi.en: revision 1.23 usr.sbin/sysinst/msg.mi.fr: revision 1.21 Sentence begins with capital letter ("yes or no?"). Also add a few french sentences, to make it less awful, but not complete. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/usr.sbin/sysinst/msg.mi.fr 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/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.19.2.2 src/usr.sbin/sysinst/msg.mi.en:1.19.2.3 --- src/usr.sbin/sysinst/msg.mi.en:1.19.2.2 Sun Aug 18 13:25:21 2019 +++ src/usr.sbin/sysinst/msg.mi.en Wed Oct 23 06:01:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.19.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ +/* $NetBSD: msg.mi.en,v 1.19.2.3 2019/10/23 06:01:55 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -977,7 +977,7 @@ message Configure_network {Configure net message Partition_a_disk {Partition a disk} message Logging_functions {Logging functions} message Halt_the_system {Halt the system} -message yes_or_no {yes or no?} +message yes_or_no {Yes or no?} message Hit_enter_to_continue {Hit enter to continue} message Choose_your_installation {Choose your installation} Index: src/usr.sbin/sysinst/msg.mi.fr diff -u src/usr.sbin/sysinst/msg.mi.fr:1.17.2.2 src/usr.sbin/sysinst/msg.mi.fr:1.17.2.3 --- src/usr.sbin/sysinst/msg.mi.fr:1.17.2.2 Sun Aug 18 13:25:21 2019 +++ src/usr.sbin/sysinst/msg.mi.fr Wed Oct 23 06:01:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.fr,v 1.17.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ +/* $NetBSD: msg.mi.fr,v 1.17.2.3 2019/10/23 06:01:55 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -269,7 +269,7 @@ message add_another_ptn * $1 = size unit GB */ message fssizesok -{Go on. Free space $0 $1.} +{Valider. Espace libre $0 $1.} /* Called with: Example * $0 = missing space 1.4 @@ -1050,7 +1050,6 @@ message Finished {Terminée} message Command_failed {Échec} message Command_ended_on_signal {Commande terminée par un signal} - message NetBSD_VERSION_Install_System {NetBSD-@@VERSION@@ Programme d'installation} message Exit_Install_System {Quitter le programme d'installation} message Install_NetBSD_to_hard_disk {Installation de NetBSD sur disque dur} @@ -1059,8 +1058,8 @@ message Re_install_sets_or_install_addit message Reboot_the_computer {Redémarrer l'ordinateur} message Utility_menu {Utilitaires} message Config_menu {Configuration} -message exit_menu_generic {Quitter} message exit_utility_menu {Quitter} +message exit_menu_generic {Quitter} message NetBSD_VERSION_Utilities {Utilitaires NetBSD-@@VERSION@@} message Run_bin_sh {Exécuter /bin/sh} message Set_timezone {Configurer le fuseau horaire} @@ -1068,7 +1067,7 @@ message Configure_network {Configurer le message Partition_a_disk {Partitionner un disque} message Logging_functions {Journaux} message Halt_the_system {Arrêter le système} -message yes_or_no {oui ou non?} +message yes_or_no {Oui ou non?} message Hit_enter_to_continue {Appuyez sur la touche Entrée pour continuer} message Choose_your_installation {Choisir le type d'installation désiré} @@ -1331,7 +1330,7 @@ message custom_type {Unknown} message dl_type_invalid {Invalid file system type code (0 .. 255)} -message cancel {Cancel} +message cancel {Annuler} message out_of_range {Invalid value} @@ -1377,7 +1376,7 @@ message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} message other_fs_type {Other type} -message editpack {Edit name of the disk} +message editpack {Changer le nom du disque} message edit_disk_pack_hdr {The name of the disk is arbitrary. It is useful for distinguishing between multiple disks.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 05:58:13 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #362): usr.sbin/sysinst/disks.c: revision 1.52 Remove a hardcoded assumption that for BIOS boot we always will have the first partition as root - in mixed EFI/BIOS setups this might not be true (and in general the user is free to define arbitrary orders). Pointed out by Robert Nestor. To generate a diff of this commit: cvs rdiff -u -r1.44.2.6 -r1.44.2.7 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Oct 23 05:58:13 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #362): usr.sbin/sysinst/disks.c: revision 1.52 Remove a hardcoded assumption that for BIOS boot we always will have the first partition as root - in mixed EFI/BIOS setups this might not be true (and in general the user is free to define arbitrary orders). Pointed out by Robert Nestor. To generate a diff of this commit: cvs rdiff -u -r1.44.2.6 -r1.44.2.7 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.6 src/usr.sbin/sysinst/disks.c:1.44.2.7 --- src/usr.sbin/sysinst/disks.c:1.44.2.6 Fri Aug 9 06:21:00 2019 +++ src/usr.sbin/sysinst/disks.c Wed Oct 23 05:58:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.6 2019/08/09 06:21:00 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.7 2019/10/23 05:58:13 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1928,12 +1928,30 @@ check_swap(const char *disk, int remove_ char * bootxx_name(struct install_partition_desc *install) { - int fstype; + size_t i; + int fstype = -1; const char *bootxxname; char *bootxx; + /* find a partition to be mounted as / */ + for (i = 0; i < install->num; i++) { + if ((install->infos[i].instflags & PUIINST_MOUNT) + && strcmp(install->infos[i].mount, "/") == 0) { + fstype = install->infos[i].fs_type; + break; + } + } + if (fstype < 0) { + /* not found? take first root type partition instead */ + for (i = 0; i < install->num; i++) { + if (install->infos[i].type == PT_root) { +fstype = install->infos[i].fs_type; +break; + } + } + } + /* check we have boot code for the root partition type */ - fstype = install->infos[0].fs_type; switch (fstype) { #if defined(BOOTXX_FFSV1) || defined(BOOTXX_FFSV2) case FS_BSDFFS:
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 29 06:46:13 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #130): usr.sbin/sysinst/bsddisklabel.c: revision 1.27 Remove dead (#if 0) code. To generate a diff of this commit: cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/usr.sbin/sysinst/bsddisklabel.c 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/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.2 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.3 --- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.2 Fri Aug 2 05:45:54 2019 +++ src/usr.sbin/sysinst/bsddisklabel.c Thu Aug 29 06:46:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.23.2.2 2019/08/02 05:45:54 msaitoh Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.23.2.3 2019/08/29 06:46:13 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -147,73 +147,6 @@ default_parts_init[] = { .def_size = DEFVARSIZE*(MEG/512), .mount = "/var", .type = PT_root }, }; -#if 0 // XXX -static int -save_ptn(int ptn, daddr_t start, daddr_t size, int fstype, const char *mountpt) -{ - static int maxptn; - partinfo *p; - int pp; - char *buf; - - if (maxptn == 0) - maxptn = getmaxpartitions(); - - if (ptn < 0 || PI_FSTYPE(>bsdlabel[ptn]) != FS_UNUSED) { - ptn = getrawpartition() + 1; -#ifdef PART_FIRST_FREE - if (ptn < PART_FIRST_FREE) - ptn = PART_FIRST_FREE; -#endif - for (;; ptn++) { - if (ptn >= maxptn) -return -1; -// XXX if (ptn == PART_USR) -//continue; - if (PI_FSTYPE(>bsdlabel[ptn]) == FS_UNUSED) -break; - } - } - - if (fstype == FS_UNUSED) - return ptn; - - p = pm->bsdlabel + ptn; - PI_SET_OFFSET(p, start); - PI_SET_SIZE(p, size); - set_ptype(p, fstype, mountpt ? PIF_NEWFS : 0); - - /* Hack because we does not have something like FS_LVMPV */ - p->lvmpv = 0; - if (mountpt != NULL && strcmp(mountpt, "lvm") == 0) - p->lvmpv = 1; - else if (mountpt != NULL) { - for (pp = 0; pp < maxptn; pp++) { - if (strcmp(pm->bsdlabel[pp].pi_mount, mountpt) == 0) -pm->bsdlabel[pp].pi_flags &= ~PIF_MOUNT; - } - if (mountpt[0] != '/') - asprintf(, "/%s", mountpt); - else - asprintf(, "%s", mountpt); - strlcpy(p->pi_mount, buf, sizeof p->pi_mount); - p->pi_flags |= PIF_MOUNT; - /* Default to UFS2. */ - if (PI_FSTYPE(p) == FS_BSDFFS) { -#ifdef DEFAULT_UFS2 -#ifndef HAVE_UFS2_BOOT - if (strcmp(mountpt, "/") != 0) -#endif -p->pi_flags |= PIF_FFSv2; -#endif - } - free(buf); - } - return ptn; -} -#endif - - static const char size_separator[] = "--- - "; static char size_menu_title[STRSIZE]; @@ -644,177 +577,7 @@ get_ptn_sizes(struct partition_usage_set pset->menu = -1; pset->menu_opts = NULL; - if (!pset->ok) - return false; - -#if 0 - if (cur_ptns.menu_no < 0) { - /* If there is a swap partition elsewhere, don't add one here.*/ - if (no_swap || (swap_created && partman_go)) { - cur_ptns.ptn_sizes[PI_SWAP].size = 0; - } else { -#if DEFSWAPSIZE == -1 - /* Dynamic swap size. */ - cur_ptns.ptn_sizes[PI_SWAP].dflt_size = get_ramsize(); - cur_ptns.ptn_sizes[PI_SWAP].size = - cur_ptns.ptn_sizes[PI_SWAP].dflt_size; -#endif - } - - /* If installing X increase default size of /usr */ - if (set_X11_selected()) - cur_ptns.ptn_sizes[PI_USR].dflt_size += XNEEDMB; - - /* Start of planning to give free space to / */ - cur_ptns.pool_part = _ptns.ptn_sizes[PI_ROOT]; - /* Make size of root include default size of /usr */ - cur_ptns.ptn_sizes[PI_ROOT].size += cur_ptns.ptn_sizes[PI_USR].dflt_size; - - sm = MEG / pm->sectorsize; - - if (root_limit != 0) { - /* Bah - bios can not read all the disk, limit root */ - cur_ptns.ptn_sizes[PI_ROOT].limit = root_limit - - part_start; - /* Allocate a /usr partition if bios can't read - * everything except swap. - */ - if (cur_ptns.ptn_sizes[PI_ROOT].limit - < sectors - cur_ptns.ptn_sizes[PI_SWAP].size * sm) { -/* Root won't be able to access all the space */ -/* Claw back space for /usr */ -cur_ptns.ptn_sizes[PI_USR].size = - cur_ptns.ptn_sizes[PI_USR].dflt_size; -cur_ptns.ptn_sizes[PI_ROOT].size -= - cur_ptns.ptn_sizes[PI_USR].dflt_size; -cur_ptns.ptn_sizes[PI_ROOT].changed = 1; -/* Give free space to /usr */ -cur_ptns.pool_part = _ptns.ptn_sizes[PI_USR]; - } - } - - /* Change preset sizes from MB to sectors */ - cur_ptns.free_space = sectors; - for (p = cur_ptns.ptn_sizes; p->mount[0]; p++) { - p->size = NUMSEC(p->size, sm, pm->dlcylsize); - p->dflt_size = NUMSEC(p->dflt_size, sm, pm->dlcylsize); - cur_ptns.free_space -= p->size; - } - - /* Steal space from swap to make things fit.. */ - if (cur_ptns.free_space < 0) { - i = roundup(-cur_ptns.free_space, pm->dlcylsize); - if (i
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 29 06:46:13 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #130): usr.sbin/sysinst/bsddisklabel.c: revision 1.27 Remove dead (#if 0) code. To generate a diff of this commit: cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Aug 28 10:01:57 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: mbr.c Log Message: Pull up following revision(s) (requested by martin in ticket #125): usr.sbin/sysinst/mbr.c: revision 1.21 When requesting no special FS sub type, default to FAT32 with LBA. Fixes one part of PR 54490. To generate a diff of this commit: cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/mbr.c 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/mbr.c diff -u src/usr.sbin/sysinst/mbr.c:1.19.2.1 src/usr.sbin/sysinst/mbr.c:1.19.2.2 --- src/usr.sbin/sysinst/mbr.c:1.19.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/mbr.c Wed Aug 28 10:01:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.19.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: mbr.c,v 1.19.2.2 2019/08/28 10:01:57 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1047,6 +1047,9 @@ mbr_get_fs_part_type(unsigned fs_type, u case FS_EX2FS: return _gen_type_desc[MBR_PTYPE_LNXEXT2].gen; case FS_MSDOS: + if (sub_type == 0) + sub_type = MBR_PTYPE_FAT32L; + switch (sub_type) { case MBR_PTYPE_FAT12: case MBR_PTYPE_FAT16S:
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Aug 28 10:01:57 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: mbr.c Log Message: Pull up following revision(s) (requested by martin in ticket #125): usr.sbin/sysinst/mbr.c: revision 1.21 When requesting no special FS sub type, default to FAT32 with LBA. Fixes one part of PR 54490. To generate a diff of this commit: cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/mbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Aug 28 10:00:53 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h upgrade.c util.c Log Message: Pull up following revision(s) (requested by martin in ticket #123): usr.sbin/sysinst/util.c: revision 1.32 usr.sbin/sysinst/upgrade.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.44 Do not offer to upgrade the "current system" if we are running off a CD (i.e. / is mounted read-only) To generate a diff of this commit: cvs rdiff -u -r1.42.2.1 -r1.42.2.2 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.12 -r1.12.2.1 src/usr.sbin/sysinst/upgrade.c cvs rdiff -u -r1.29.2.2 -r1.29.2.3 src/usr.sbin/sysinst/util.c 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/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.42.2.1 src/usr.sbin/sysinst/defs.h:1.42.2.2 --- src/usr.sbin/sysinst/defs.h:1.42.2.1 Thu Aug 8 05:51:43 2019 +++ src/usr.sbin/sysinst/defs.h Wed Aug 28 10:00:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.42.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ +/* $NetBSD: defs.h,v 1.42.2.2 2019/08/28 10:00:53 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -712,6 +712,7 @@ bool parts_use_wholedisk(struct disk_par bool md_parts_use_wholedisk(struct disk_partitions*); /* from util.c */ +bool root_is_read_only(void); void get_ptn_alignment(const struct disk_partitions *parts, daddr_t *align, daddr_t *p0off); char* str_arg_subst(const char *, size_t, const char **); void msg_display_subst(const char *, size_t, ...); Index: src/usr.sbin/sysinst/upgrade.c diff -u src/usr.sbin/sysinst/upgrade.c:1.12 src/usr.sbin/sysinst/upgrade.c:1.12.2.1 --- src/usr.sbin/sysinst/upgrade.c:1.12 Tue Jul 23 18:13:40 2019 +++ src/usr.sbin/sysinst/upgrade.c Wed Aug 28 10:00:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: upgrade.c,v 1.12 2019/07/23 18:13:40 martin Exp $ */ +/* $NetBSD: upgrade.c,v 1.12.2.1 2019/08/28 10:00:53 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -64,7 +64,7 @@ do_upgrade(void) get_ramsize(); - if (find_disks(msg_string(MSG_upgrade), true) < 0) + if (find_disks(msg_string(MSG_upgrade), !root_is_read_only()) < 0) return; if (pm->parts == NULL && !pm->cur_system) { @@ -208,7 +208,7 @@ do_reinstall_sets() if (!ask_noyes(NULL)) return; - if (find_disks(msg_string(MSG_reinstall), true) < 0) + if (find_disks(msg_string(MSG_reinstall), !root_is_read_only()) < 0) return; if (!pm->cur_system) { Index: src/usr.sbin/sysinst/util.c diff -u src/usr.sbin/sysinst/util.c:1.29.2.2 src/usr.sbin/sysinst/util.c:1.29.2.3 --- src/usr.sbin/sysinst/util.c:1.29.2.2 Sun Aug 18 13:29:15 2019 +++ src/usr.sbin/sysinst/util.c Wed Aug 28 10:00:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.29.2.2 2019/08/18 13:29:15 msaitoh Exp $ */ +/* $NetBSD: util.c,v 1.29.2.3 2019/08/28 10:00:53 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -537,6 +537,17 @@ boot_media_still_needed(void) return 0; } +bool +root_is_read_only(void) +{ + struct statvfs sb; + + if (statvfs("/", ) == 0) + return sb.f_flag & ST_RDONLY; + + return false; +} + /* * Get from a CDROM distribution. * Also used on "installation using bootable install media"
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed Aug 28 10:00:53 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h upgrade.c util.c Log Message: Pull up following revision(s) (requested by martin in ticket #123): usr.sbin/sysinst/util.c: revision 1.32 usr.sbin/sysinst/upgrade.c: revision 1.13 usr.sbin/sysinst/defs.h: revision 1.44 Do not offer to upgrade the "current system" if we are running off a CD (i.e. / is mounted read-only) To generate a diff of this commit: cvs rdiff -u -r1.42.2.1 -r1.42.2.2 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.12 -r1.12.2.1 src/usr.sbin/sysinst/upgrade.c cvs rdiff -u -r1.29.2.2 -r1.29.2.3 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Tue Aug 27 04:21:01 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #119): usr.sbin/sysinst/gpt.c: revision 1.11 Fix a bug when installing to pre-exising GPT partitions. Handle GPT labels with spaces. To generate a diff of this commit: cvs rdiff -u -r1.6.2.4 -r1.6.2.5 src/usr.sbin/sysinst/gpt.c 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/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.6.2.4 src/usr.sbin/sysinst/gpt.c:1.6.2.5 --- src/usr.sbin/sysinst/gpt.c:1.6.2.4 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/gpt.c Tue Aug 27 04:21:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.6.2.4 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: gpt.c,v 1.6.2.5 2019/08/27 04:21:01 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -1131,7 +1131,7 @@ gpt_modify_part(const char *disk, struct /* Check label */ if (strcmp(p->gp_label, old.gp_label) != 0) { if (run_program(RUN_SILENT, - "gpt label -b %" PRIu64 " -l %s %s", + "gpt label -b %" PRIu64 " -l \'%s\' %s", p->gp_start, p->gp_label, disk) != 0) return false; } @@ -1213,6 +1213,20 @@ gpt_add_wedge(const char *disk, struct g return true; } +static void +escape_spaces(char *dest, const char *src) +{ + unsigned char c; + + while (*src) { + c = *src++; + if (isspace(c) || c == '\\') + *dest++ = '\\'; + *dest++ = c; + } + *dest = 0; +} + static bool gpt_get_part_device(const struct disk_partitions *arg, part_id id, char *devname, size_t max_devname_len, int *part, @@ -1221,6 +1235,7 @@ gpt_get_part_device(const struct disk_pa const struct gpt_disk_partitions *parts = (const struct gpt_disk_partitions*)arg; struct gpt_part_entry *p = parts->partitions; + char tmpname[GPT_LABEL_LEN*2]; part_id no; @@ -1239,12 +1254,14 @@ gpt_get_part_device(const struct disk_pa switch (usage) { case logical_name: - if (p->gp_label[0] != 0) + if (p->gp_label[0] != 0) { + escape_spaces(tmpname, p->gp_label); snprintf(devname, max_devname_len, - "NAME=%s", p->gp_label); - else + "NAME=%s", tmpname); + } else { snprintf(devname, max_devname_len, "NAME=%s", p->gp_id); + } break; case plain_name: assert(p->gp_flags & GPEF_WEDGE); @@ -1275,7 +1292,7 @@ gpt_write_to_disk(struct disk_partitions { struct gpt_disk_partitions *parts = (struct gpt_disk_partitions*)arg; struct gpt_part_entry *p, *n; - char label_arg[sizeof(p->gp_label) + 4]; + char label_arg[sizeof(p->gp_label) + 10]; char diskpath[MAXPATHLEN]; int fd, bits = 0; bool root_is_new = false, efi_is_new = false; @@ -1295,11 +1312,9 @@ gpt_write_to_disk(struct disk_partitions close(fd); /* - * Mark all partitions as "have no wedge yet". While there, - * collect first root and efi partition (if available) + * Collect first root and efi partition (if available) */ for (pno = 0, p = parts->partitions; p != NULL; p = p->gp_next, pno++) { - p->gp_flags &= ~GPEF_WEDGE; if (root_id == NO_PART && p->gp_type != NULL) { if (p->gp_type->gent.generic_ptype == PT_root && p->gp_start == pm->ptstart) { @@ -1373,7 +1388,7 @@ gpt_write_to_disk(struct disk_partitions if (p->gp_label[0] == 0) label_arg[0] = 0; else - sprintf(label_arg, "-l %s", p->gp_label); + sprintf(label_arg, "-l \'%s\'", p->gp_label); if (p->gp_type != NULL) run_program(RUN_SILENT,
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Tue Aug 27 04:21:01 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #119): usr.sbin/sysinst/gpt.c: revision 1.11 Fix a bug when installing to pre-exising GPT partitions. Handle GPT labels with spaces. To generate a diff of this commit: cvs rdiff -u -r1.6.2.4 -r1.6.2.5 src/usr.sbin/sysinst/gpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:32:50 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: checkrc.c Log Message: Pull up following revision(s) (requested by martin in ticket #89): usr.sbin/sysinst/checkrc.c: revision 1.2 Fix memory leak (found by MKSANITIZER=yes build). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/checkrc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:32:50 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: checkrc.c Log Message: Pull up following revision(s) (requested by martin in ticket #89): usr.sbin/sysinst/checkrc.c: revision 1.2 Fix memory leak (found by MKSANITIZER=yes build). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/checkrc.c 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/checkrc.c diff -u src/usr.sbin/sysinst/checkrc.c:1.1 src/usr.sbin/sysinst/checkrc.c:1.1.30.1 --- src/usr.sbin/sysinst/checkrc.c:1.1 Sat Jul 26 19:30:44 2014 +++ src/usr.sbin/sysinst/checkrc.c Sun Aug 18 13:32:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: checkrc.c,v 1.1 2014/07/26 19:30:44 dholland Exp $ */ +/* $NetBSD: checkrc.c,v 1.1.30.1 2019/08/18 13:32:50 msaitoh Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -81,6 +81,7 @@ static int check(const char *varname, int filetocheck) { char *buf; + int rv; create_script(varname, filetocheck); @@ -98,10 +99,9 @@ check(const char *varname, int filetoche fflush(logfp); } - if (strncmp(buf, "YES", strlen("YES")) == 0) - return 1; - else - return 0; + rv = strncmp(buf, "YES", strlen("YES")) == 0; + free(buf); + return rv; } int
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:29:15 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: install.c util.c Log Message: Pull up following revision(s) (requested by martin in ticket #83): usr.sbin/sysinst/util.c: revision 1.31 usr.sbin/sysinst/install.c: revision 1.10 usr.sbin/sysinst/install.c: revision 1.11 Fix some memory leaks in error paths Oops, avoid double free. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.2.1 src/usr.sbin/sysinst/install.c cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:29:15 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: install.c util.c Log Message: Pull up following revision(s) (requested by martin in ticket #83): usr.sbin/sysinst/util.c: revision 1.31 usr.sbin/sysinst/install.c: revision 1.10 usr.sbin/sysinst/install.c: revision 1.11 Fix some memory leaks in error paths Oops, avoid double free. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.2.1 src/usr.sbin/sysinst/install.c cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/usr.sbin/sysinst/util.c 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/install.c diff -u src/usr.sbin/sysinst/install.c:1.9 src/usr.sbin/sysinst/install.c:1.9.2.1 --- src/usr.sbin/sysinst/install.c:1.9 Tue Jul 23 18:13:40 2019 +++ src/usr.sbin/sysinst/install.c Sun Aug 18 13:29:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: install.c,v 1.9 2019/07/23 18:13:40 martin Exp $ */ +/* $NetBSD: install.c,v 1.9.2.1 2019/08/18 13:29:15 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -165,7 +165,7 @@ do_install(void) if (!md_get_info() || !md_make_bsd_partitions()) { hit_enter_to_continue(MSG_abort_inst, NULL); - return; + goto error; } /* Last chance ... do you really want to do this? */ @@ -173,7 +173,7 @@ do_install(void) refresh(); msg_fmt_display(MSG_lastchance, "%s", pm->diskdev); if (!ask_noyes(NULL)) - return; + goto error; /* * Check if we have a secondary partitioning and @@ -194,19 +194,19 @@ do_install(void) make_filesystems() || make_fstab() != 0 || md_post_newfs() != 0) - return; + goto error; } /* Unpack the distribution. */ process_menu(MENU_distset, ); if (retcode == 0) - return; + goto error; if (get_and_unpack_sets(0, MSG_disksetupdone, MSG_extractcomplete, MSG_abortinst) != 0) - return; + goto error; if (md_post_extract() != 0) - return; + goto error; do_configmenu(); @@ -214,7 +214,8 @@ do_install(void) md_cleanup_install(); - free(install.infos); - hit_enter_to_continue(MSG_instcomplete, NULL); + +error: + free(install.infos); } Index: src/usr.sbin/sysinst/util.c diff -u src/usr.sbin/sysinst/util.c:1.29.2.1 src/usr.sbin/sysinst/util.c:1.29.2.2 --- src/usr.sbin/sysinst/util.c:1.29.2.1 Sun Aug 18 13:25:21 2019 +++ src/usr.sbin/sysinst/util.c Sun Aug 18 13:29:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.29.2.1 2019/08/18 13:25:21 msaitoh Exp $ */ +/* $NetBSD: util.c,v 1.29.2.2 2019/08/18 13:29:15 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -933,6 +933,7 @@ extract_file(distinfo *dist, int update) 1, >name); hit_enter_to_continue(err, NULL); free(err); + free(owd); return SET_RETRY; } #ifdef SUPPORT_8_3_SOURCE_FILESYSTEM
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:25:21 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl util.c Log Message: Pull up following revision(s) (requested by martin in ticket #82): usr.sbin/sysinst/util.c: revision 1.30 usr.sbin/sysinst/msg.mi.fr: revision 1.19 usr.sbin/sysinst/msg.mi.de: revision 1.15 usr.sbin/sysinst/msg.mi.es: revision 1.16 usr.sbin/sysinst/msg.mi.pl: revision 1.22 usr.sbin/sysinst/msg.mi.en: revision 1.21 PR 54473: fix error prompt when a set file is missing To generate a diff of this commit: cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.29 -r1.29.2.1 src/usr.sbin/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:25:21 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl util.c Log Message: Pull up following revision(s) (requested by martin in ticket #82): usr.sbin/sysinst/util.c: revision 1.30 usr.sbin/sysinst/msg.mi.fr: revision 1.19 usr.sbin/sysinst/msg.mi.de: revision 1.15 usr.sbin/sysinst/msg.mi.es: revision 1.16 usr.sbin/sysinst/msg.mi.pl: revision 1.22 usr.sbin/sysinst/msg.mi.en: revision 1.21 PR 54473: fix error prompt when a set file is missing To generate a diff of this commit: cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.29 -r1.29.2.1 src/usr.sbin/sysinst/util.c 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/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.13.2.1 src/usr.sbin/sysinst/msg.mi.de:1.13.2.2 --- src/usr.sbin/sysinst/msg.mi.de:1.13.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/msg.mi.de Sun Aug 18 13:25:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.13.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: msg.mi.de,v 1.13.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -679,8 +679,11 @@ Installation abgebrochen.} message delete_xfer_file {Nach der Installation löschen} +/* Called with: Example + * $0 = set name base + */ message notarfile -{Das Release-Paket %s existiert nicht.} +{Das Release-Paket $0 existiert nicht.} message endtarok {Alle Distributionspakete wurden erfolgreich entpackt.} Index: src/usr.sbin/sysinst/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.19.2.1 src/usr.sbin/sysinst/msg.mi.en:1.19.2.2 --- src/usr.sbin/sysinst/msg.mi.en:1.19.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/msg.mi.en Sun Aug 18 13:25:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.19.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: msg.mi.en,v 1.19.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -652,8 +652,11 @@ Install aborted.} message delete_xfer_file {Delete after install} +/* Called with: Example + * $0 = set name base + */ message notarfile -{Release set %s does not exist.} +{Release set $0 does not exist.} message endtarok {All selected distribution sets unpacked successfully.} Index: src/usr.sbin/sysinst/msg.mi.es diff -u src/usr.sbin/sysinst/msg.mi.es:1.14.2.1 src/usr.sbin/sysinst/msg.mi.es:1.14.2.2 --- src/usr.sbin/sysinst/msg.mi.es:1.14.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/msg.mi.es Sun Aug 18 13:25:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.es,v 1.14.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: msg.mi.es,v 1.14.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -668,8 +668,11 @@ Instalación interrumpida.} message delete_xfer_file {A eliminar después de la instalación} +/* Called with: Example + * $0 = set name base + */ message notarfile -{El conjunto %s no existe.} +{El conjunto $0 no existe.} message endtarok {Todos los conjuntos de distribución han sido desempaquetados Index: src/usr.sbin/sysinst/msg.mi.fr diff -u src/usr.sbin/sysinst/msg.mi.fr:1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr:1.17.2.2 --- src/usr.sbin/sysinst/msg.mi.fr:1.17.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/msg.mi.fr Sun Aug 18 13:25:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.fr,v 1.17.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: msg.mi.fr,v 1.17.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -684,8 +684,11 @@ message delete_xfer_file Effacer après l'installation } +/* Called with: Example + * $0 = set name base + */ message notarfile -{Le composant %s n'existe pas.} +{Le composant $0 n'existe pas.} message endtarok { Index: src/usr.sbin/sysinst/msg.mi.pl diff -u src/usr.sbin/sysinst/msg.mi.pl:1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl:1.20.2.2 --- src/usr.sbin/sysinst/msg.mi.pl:1.20.2.1 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/msg.mi.pl Sun Aug 18 13:25:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.pl,v 1.20.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: msg.mi.pl,v 1.20.2.2 2019/08/18 13:25:21 msaitoh Exp $ */ /* Based on english version: */ /* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */ @@ -648,8 +648,11 @@ Instalacja przerwana.} message delete_xfer_file {Usun po zakonczeniu instalacji} +/* Called with: Example + * $0
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:22:49 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #79): usr.sbin/sysinst/disklabel.c: revision 1.13 Fix some "partition index" (as used in the abstract interface) versus disklabel "partition letter" confusion. To generate a diff of this commit: cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/usr.sbin/sysinst/disklabel.c 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/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10.2.2 src/usr.sbin/sysinst/disklabel.c:1.10.2.3 --- src/usr.sbin/sysinst/disklabel.c:1.10.2.2 Sun Aug 18 13:21:40 2019 +++ src/usr.sbin/sysinst/disklabel.c Sun Aug 18 13:22:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10.2.2 2019/08/18 13:21:40 msaitoh Exp $ */ +/* $NetBSD: disklabel.c,v 1.10.2.3 2019/08/18 13:22:49 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -814,9 +814,25 @@ disklabel_get_part_device(const struct d part_id ptn, char *devname, size_t max_devname_len, int *part, enum dev_name_usage which_name, bool with_path) { + const struct disklabel_disk_partitions *parts = + (const struct disklabel_disk_partitions*)arg; + part_id id; + int part_index; + char pname; + + if (ptn >= parts->l.d_npartitions) + return false; + + for (id = part_index = 0; id < ptn && + part_index < parts->l.d_npartitions; part_index++) + if (parts->l.d_partitions[part_index].p_fstype != FS_UNUSED || + parts->l.d_partitions[part_index].p_size != 0) + id++; if (part != 0) - *part = ptn; + *part = part_index; + + pname = 'a'+ part_index; switch (which_name) { case parent_device_only: @@ -826,18 +842,18 @@ disklabel_get_part_device(const struct d case plain_name: if (with_path) snprintf(devname, max_devname_len, _PATH_DEV "%s%c", - arg->disk, (char)ptn + 'a'); + arg->disk, pname); else snprintf(devname, max_devname_len, "%s%c", - arg->disk, (char)ptn + 'a'); + arg->disk, pname); return true; case raw_dev_name: if (with_path) snprintf(devname, max_devname_len, _PATH_DEV "r%s%c", - arg->disk, (char)ptn + 'a'); + arg->disk, pname); else snprintf(devname, max_devname_len, "r%s%c", - arg->disk, (char)ptn + 'a'); + arg->disk, pname); return true; } @@ -1024,7 +1040,7 @@ disklabel_find_by_name(struct disk_parti (const struct disklabel_disk_partitions*)arg; char *sl, part; ptrdiff_t n; - part_id pno; + part_id pno, id, i; sl = strrchr(name, '/'); if (sl == NULL) @@ -1040,7 +1056,11 @@ disklabel_find_by_name(struct disk_parti return NO_PART; if (parts->l.d_partitions[pno].p_fstype == FS_UNUSED) return NO_PART; - return pno; + for (id = 0, i = 0; i < pno; i++) + if (parts->l.d_partitions[i].p_fstype != FS_UNUSED || + parts->l.d_partitions[i].p_size != 0) + id++; + return id; } static void
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:22:49 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #79): usr.sbin/sysinst/disklabel.c: revision 1.13 Fix some "partition index" (as used in the abstract interface) versus disklabel "partition letter" confusion. To generate a diff of this commit: cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/usr.sbin/sysinst/disklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:21:40 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c gpt.c mbr.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl partitions.c partitions.h Log Message: Pull up following revision(s) (requested by martin in ticket #78): usr.sbin/sysinst/gpt.c: revision 1.10 usr.sbin/sysinst/disklabel.c: revision 1.12 usr.sbin/sysinst/msg.mi.fr: revision 1.18 usr.sbin/sysinst/msg.mi.de: revision 1.14 usr.sbin/sysinst/partitions.c: revision 1.2 usr.sbin/sysinst/msg.mi.es: revision 1.15 usr.sbin/sysinst/msg.mi.pl: revision 1.21 usr.sbin/sysinst/partitions.h: revision 1.6 usr.sbin/sysinst/msg.mi.en: revision 1.20 usr.sbin/sysinst/mbr.c: revision 1.20 On architectures that usually do MBR/disklabel, nevertheless deal with pure/plain disklabel disks, and explicitly offer this as partitioning option when bootability is not a concern. To generate a diff of this commit: cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.19 -r1.19.2.1 src/usr.sbin/sysinst/mbr.c \ src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.13 -r1.13.2.1 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.14 -r1.14.2.1 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.17 -r1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.1 -r1.1.2.1 src/usr.sbin/sysinst/partitions.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.sbin/sysinst/partitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:21:40 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disklabel.c gpt.c mbr.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl partitions.c partitions.h Log Message: Pull up following revision(s) (requested by martin in ticket #78): usr.sbin/sysinst/gpt.c: revision 1.10 usr.sbin/sysinst/disklabel.c: revision 1.12 usr.sbin/sysinst/msg.mi.fr: revision 1.18 usr.sbin/sysinst/msg.mi.de: revision 1.14 usr.sbin/sysinst/partitions.c: revision 1.2 usr.sbin/sysinst/msg.mi.es: revision 1.15 usr.sbin/sysinst/msg.mi.pl: revision 1.21 usr.sbin/sysinst/partitions.h: revision 1.6 usr.sbin/sysinst/msg.mi.en: revision 1.20 usr.sbin/sysinst/mbr.c: revision 1.20 On architectures that usually do MBR/disklabel, nevertheless deal with pure/plain disklabel disks, and explicitly offer this as partitioning option when bootability is not a concern. To generate a diff of this commit: cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.19 -r1.19.2.1 src/usr.sbin/sysinst/mbr.c \ src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.13 -r1.13.2.1 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.14 -r1.14.2.1 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.17 -r1.17.2.1 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.1 -r1.1.2.1 src/usr.sbin/sysinst/partitions.c cvs rdiff -u -r1.4.2.1 -r1.4.2.2 src/usr.sbin/sysinst/partitions.h 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/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10.2.1 src/usr.sbin/sysinst/disklabel.c:1.10.2.2 --- src/usr.sbin/sysinst/disklabel.c:1.10.2.1 Thu Aug 8 05:51:43 2019 +++ src/usr.sbin/sysinst/disklabel.c Sun Aug 18 13:21:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ +/* $NetBSD: disklabel.c,v 1.10.2.2 2019/08/18 13:21:40 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -164,7 +164,8 @@ disklabel_parts_new(const char *dev, dad } static struct disk_partitions * -disklabel_parts_read(const char *disk, daddr_t start, daddr_t len) +disklabel_parts_read(const char *disk, daddr_t start, daddr_t len, +const struct disk_partitioning_scheme *scheme) { int fd; char diskpath[MAXPATHLEN]; @@ -214,7 +215,7 @@ disklabel_parts_read(const char *disk, d if (len > disklabel_parts.size_limit) len = disklabel_parts.size_limit; - parts->dp.pscheme = _parts; + parts->dp.pscheme = scheme; parts->dp.disk = disk; parts->dp.disk_start = start; parts->dp.disk_size = parts->dp.free_space = len; Index: src/usr.sbin/sysinst/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.6.2.3 src/usr.sbin/sysinst/gpt.c:1.6.2.4 --- src/usr.sbin/sysinst/gpt.c:1.6.2.3 Thu Aug 8 05:51:43 2019 +++ src/usr.sbin/sysinst/gpt.c Sun Aug 18 13:21:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.6.2.3 2019/08/08 05:51:43 msaitoh Exp $ */ +/* $NetBSD: gpt.c,v 1.6.2.4 2019/08/18 13:21:40 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -249,7 +249,8 @@ update_part_from_wedge_info(struct gpt_d } static struct disk_partitions * -gpt_read_from_disk(const char *dev, daddr_t start, daddr_t len) +gpt_read_from_disk(const char *dev, daddr_t start, daddr_t len, +const struct disk_partitioning_scheme *scheme) { char diskpath[MAXPATHLEN]; int fd; @@ -362,7 +363,7 @@ gpt_read_from_disk(const char *dev, dadd return NULL; } - parts->dp.pscheme = _parts; + parts->dp.pscheme = scheme; parts->dp.disk = dev; parts->dp.disk_start = start; parts->dp.disk_size = disk_size; Index: src/usr.sbin/sysinst/mbr.c diff -u src/usr.sbin/sysinst/mbr.c:1.19 src/usr.sbin/sysinst/mbr.c:1.19.2.1 --- src/usr.sbin/sysinst/mbr.c:1.19 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/mbr.c Sun Aug 18 13:21:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.19 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: mbr.c,v 1.19.2.1 2019/08/18 13:21:40 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -880,7 +880,8 @@ mbr_calc_free_space(struct mbr_disk_part } static struct disk_partitions * -mbr_read_from_disk(const char *disk, daddr_t start, daddr_t len) +mbr_read_from_disk(const char *disk, daddr_t start, daddr_t len, +const struct disk_partitioning_scheme *scheme) { struct mbr_disk_partitions *parts; @@ -892,7 +893,7 @@ mbr_read_from_disk(const char *disk, dad if (!parts) return NULL; - parts->dp.pscheme = _parts; + parts->dp.pscheme = scheme; parts->dp.disk = disk; if (len >= mbr_parts.size_limit) len = mbr_parts.size_limit; @@ -1629,7 +1630,8 @@ mbr_read_disklabel(struct disk_partition if (!force_empty)
CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:19:53 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #77): usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.6 usr.sbin/sysinst/arch/playstation2/md.c: revision 1.6 usr.sbin/sysinst/arch/evbppc/md.c: revision 1.6 usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.6 usr.sbin/sysinst/arch/zaurus/md.c: revision 1.6 usr.sbin/sysinst/arch/arc/md.c: revision 1.9 usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.6 usr.sbin/sysinst/arch/bebox/md.c: revision 1.6 usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.7 usr.sbin/sysinst/arch/landisk/md.c: revision 1.11 usr.sbin/sysinst/arch/prep/md.c: revision 1.9 usr.sbin/sysinst/arch/i386/md.c: revision 1.21 usr.sbin/sysinst/arch/evbmips/md.c: revision 1.6 usr.sbin/sysinst/arch/evbarm/md.c: revision 1.9 usr.sbin/sysinst/arch/cobalt/md.c: revision 1.9 usr.sbin/sysinst/arch/ofppc/md.c: revision 1.8 When we ask the user to select a partitioning scheme and they refuse (that is: select "Exit" in the menu), abort installation. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/arc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/bebox/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/cobalt/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/evbarm/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbmips/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbppc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcarm/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcmips/md.c cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/hpcsh/md.c cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/arch/i386/md.c cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/arch/landisk/md.c cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/arch/ofppc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/playstation2/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/prep/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/sandpoint/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/zaurus/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:19:53 UTC 2019 Modified Files: src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/bebox [netbsd-9]: md.c src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbmips [netbsd-9]: md.c src/usr.sbin/sysinst/arch/evbppc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcarm [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcmips [netbsd-9]: md.c src/usr.sbin/sysinst/arch/hpcsh [netbsd-9]: md.c src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c src/usr.sbin/sysinst/arch/landisk [netbsd-9]: md.c src/usr.sbin/sysinst/arch/ofppc [netbsd-9]: md.c src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: md.c src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c src/usr.sbin/sysinst/arch/sandpoint [netbsd-9]: md.c src/usr.sbin/sysinst/arch/zaurus [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #77): usr.sbin/sysinst/arch/sandpoint/md.c: revision 1.6 usr.sbin/sysinst/arch/playstation2/md.c: revision 1.6 usr.sbin/sysinst/arch/evbppc/md.c: revision 1.6 usr.sbin/sysinst/arch/hpcarm/md.c: revision 1.6 usr.sbin/sysinst/arch/zaurus/md.c: revision 1.6 usr.sbin/sysinst/arch/arc/md.c: revision 1.9 usr.sbin/sysinst/arch/hpcmips/md.c: revision 1.6 usr.sbin/sysinst/arch/bebox/md.c: revision 1.6 usr.sbin/sysinst/arch/hpcsh/md.c: revision 1.7 usr.sbin/sysinst/arch/landisk/md.c: revision 1.11 usr.sbin/sysinst/arch/prep/md.c: revision 1.9 usr.sbin/sysinst/arch/i386/md.c: revision 1.21 usr.sbin/sysinst/arch/evbmips/md.c: revision 1.6 usr.sbin/sysinst/arch/evbarm/md.c: revision 1.9 usr.sbin/sysinst/arch/cobalt/md.c: revision 1.9 usr.sbin/sysinst/arch/ofppc/md.c: revision 1.8 When we ask the user to select a partitioning scheme and they refuse (that is: select "Exit" in the menu), abort installation. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/arc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/bebox/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/cobalt/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/evbarm/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbmips/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/evbppc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcarm/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/hpcmips/md.c cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/hpcsh/md.c cvs rdiff -u -r1.20 -r1.20.2.1 src/usr.sbin/sysinst/arch/i386/md.c cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/arch/landisk/md.c cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/arch/ofppc/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/playstation2/md.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/prep/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/sandpoint/md.c cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/sysinst/arch/zaurus/md.c 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/arch/arc/md.c diff -u src/usr.sbin/sysinst/arch/arc/md.c:1.8 src/usr.sbin/sysinst/arch/arc/md.c:1.8.2.1 --- src/usr.sbin/sysinst/arch/arc/md.c:1.8 Sat Jul 13 17:13:36 2019 +++ src/usr.sbin/sysinst/arch/arc/md.c Sun Aug 18 13:19:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.8 2019/07/13 17:13:36 martin Exp $ */ +/* $NetBSD: md.c,v 1.8.2.1 2019/08/18 13:19:51 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -75,7 +75,7 @@ md_get_info(struct install_partition_des select_part_scheme(pm, NULL, true, NULL); if (!ps) - return true; + return false; struct disk_partitions *parts = (*ps->create_new_for_disk)(pm->diskdev, Index: src/usr.sbin/sysinst/arch/bebox/md.c diff -u src/usr.sbin/sysinst/arch/bebox/md.c:1.5 src/usr.sbin/sysinst/arch/bebox/md.c:1.5.2.1 --- src/usr.sbin/sysinst/arch/bebox/md.c:1.5 Sat Jul 13 17:13:36 2019 +++ src/usr.sbin/sysinst/arch/bebox/md.c Sun Aug 18 13:19:52 2019 @@ -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 2019/08/18 13:19:52 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -68,7 +68,7 @@ md_get_info(struct install_partition_des select_part_scheme(pm, NULL, true, NULL); if (!ps) - return true; + return false; struct disk_partitions *parts = (*ps->create_new_for_disk)(pm->diskdev, Index: src/usr.sbin/sysinst/arch/cobalt/md.c diff -u src/usr.sbin/sysinst/arch/cobalt/md.c:1.8 src/usr.sbin/sysinst/arch/cobalt/md.c:1.8.2.1 --- src/usr.sbin/sysinst/arch/cobalt/md.c:1.8
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:17:39 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: partman.c Log Message: Pull up following revision(s) (requested by martin in ticket #76): usr.sbin/sysinst/partman.c: revision 1.42 Make sure to completely initialize dynamic menu entries. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.2.1 src/usr.sbin/sysinst/partman.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Sun Aug 18 13:17:39 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: partman.c Log Message: Pull up following revision(s) (requested by martin in ticket #76): usr.sbin/sysinst/partman.c: revision 1.42 Make sure to completely initialize dynamic menu entries. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.2.1 src/usr.sbin/sysinst/partman.c 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/partman.c diff -u src/usr.sbin/sysinst/partman.c:1.41 src/usr.sbin/sysinst/partman.c:1.41.2.1 --- src/usr.sbin/sysinst/partman.c:1.41 Thu Jul 25 19:01:08 2019 +++ src/usr.sbin/sysinst/partman.c Sun Aug 18 13:17:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: partman.c,v 1.41 2019/07/25 19:01:08 martin Exp $ */ +/* $NetBSD: partman.c,v 1.41.2.1 2019/08/18 13:17:39 msaitoh Exp $ */ /* * Copyright 2012 Eugene Lozovoy @@ -2802,8 +2802,7 @@ pm_upddevlist(menudesc *m, void *arg) return -1; SLIST_FOREACH(pm_i, _head, l) { - m->opts[i].opt_name = NULL; - m->opts[i].opt_exp_name = NULL; + memset(>opts[i], 0, sizeof m->opts[i]); m->opts[i].opt_action = pm_submenu; ((struct part_entry *)arg)[i].dev_ptr = pm_i; ((struct part_entry *)arg)[i].id = NO_PART; @@ -2837,8 +2836,7 @@ pm_upddevlist(menudesc *m, void *arg) if (i >= MAX_ENTRIES) break; i++; -m->opts[i].opt_name = NULL; -m->opts[i].opt_exp_name = NULL; +memset(>opts[i], 0, sizeof m->opts[i]); m->opts[i].opt_action = pm_submenu; ((struct part_entry *)arg)[i].parts = pm_i->parts; @@ -2860,8 +2858,7 @@ pm_upddevlist(menudesc *m, void *arg) if (i >= MAX_ENTRIES) break; i++; -m->opts[i].opt_name = NULL; -m->opts[i].opt_exp_name = NULL; +memset(>opts[i], 0, sizeof m->opts[i]); m->opts[i].opt_action = pm_submenu; ((struct part_entry *)arg)[i].parts = secondary; ((struct part_entry *)arg)[i].dev_ptr = pm_i;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 9 06:21:01 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #33): usr.sbin/sysinst/disks.c: revision 1.50 Do not even consider to fsck partitions where we do not know the file system type. Add v7fs support. To generate a diff of this commit: cvs rdiff -u -r1.44.2.5 -r1.44.2.6 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.5 src/usr.sbin/sysinst/disks.c:1.44.2.6 --- src/usr.sbin/sysinst/disks.c:1.44.2.5 Fri Aug 9 06:20:12 2019 +++ src/usr.sbin/sysinst/disks.c Fri Aug 9 06:21:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.5 2019/08/09 06:20:12 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.6 2019/08/09 06:21:00 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1121,6 +1121,8 @@ make_filesystems(struct install_partitio */ ptn = >infos[i]; parts = ptn->parts; + newfs = NULL; + fsname = NULL; if (ptn->size == 0 || parts == NULL|| ptn->type == PT_swap) continue; @@ -1136,7 +1138,6 @@ make_filesystems(struct install_partitio parts->pscheme->get_part_device(parts, ptn->cur_part_id, rdev, sizeof rdev, , raw_dev_name, true); - newfs = NULL; switch (ptn->fs_type) { case FS_APPLEUFS: asprintf(, "/sbin/newfs"); @@ -1168,6 +1169,11 @@ make_filesystems(struct install_partitio mnt_opts = "-tsysvbfs"; fsname = "sysvbfs"; break; + case FS_V7: + asprintf(, "/sbin/newfs_v7fs"); + mnt_opts = "-tv7fs"; + fsname = "v7fs"; + break; case FS_EX2FS: asprintf(, "/sbin/newfs_ext2fs"); mnt_opts = "-text2fs"; @@ -1192,7 +1198,8 @@ make_filesystems(struct install_partitio error = run_program(RUN_DISPLAY | RUN_PROGRESS, "%s %s", newfs, rdev); } - } else if (ptn->instflags & (PUIINST_MOUNT|PUIINST_BOOT)) { + } else if ((ptn->instflags & (PUIINST_MOUNT|PUIINST_BOOT)) + && fsname != NULL) { /* We'd better check it isn't dirty */ error = fsck_preen(devdev, fsname, false); }
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 9 06:21:01 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #33): usr.sbin/sysinst/disks.c: revision 1.50 Do not even consider to fsck partitions where we do not know the file system type. Add v7fs support. To generate a diff of this commit: cvs rdiff -u -r1.44.2.5 -r1.44.2.6 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 9 06:20:12 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #32): usr.sbin/sysinst/disks.c: revision 1.49 Do not try to fsck partitions we are never going to mount. Found by Andreas Gustafsson's baremetal test bed. To generate a diff of this commit: cvs rdiff -u -r1.44.2.4 -r1.44.2.5 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.4 src/usr.sbin/sysinst/disks.c:1.44.2.5 --- src/usr.sbin/sysinst/disks.c:1.44.2.4 Thu Aug 8 05:53:03 2019 +++ src/usr.sbin/sysinst/disks.c Fri Aug 9 06:20:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.4 2019/08/08 05:53:03 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.5 2019/08/09 06:20:12 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1192,7 +1192,7 @@ make_filesystems(struct install_partitio error = run_program(RUN_DISPLAY | RUN_PROGRESS, "%s %s", newfs, rdev); } - } else { + } else if (ptn->instflags & (PUIINST_MOUNT|PUIINST_BOOT)) { /* We'd better check it isn't dirty */ error = fsck_preen(devdev, fsname, false); }
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 9 06:20:12 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #32): usr.sbin/sysinst/disks.c: revision 1.49 Do not try to fsck partitions we are never going to mount. Found by Andreas Gustafsson's baremetal test bed. To generate a diff of this commit: cvs rdiff -u -r1.44.2.4 -r1.44.2.5 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:53:03 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #29): usr.sbin/sysinst/disks.c: revision 1.48 When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.44.2.3 -r1.44.2.4 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.3 src/usr.sbin/sysinst/disks.c:1.44.2.4 --- src/usr.sbin/sysinst/disks.c:1.44.2.3 Thu Aug 8 05:51:43 2019 +++ src/usr.sbin/sysinst/disks.c Thu Aug 8 05:53:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.3 2019/08/08 05:51:43 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.4 2019/08/08 05:53:03 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1352,7 +1352,7 @@ make_fstab(struct install_partition_desc "%s%s\t\t%s\t%s\trw%s%s%s%s%s%s%s%s\t\t %d %d\n", s, dev, mp, fstype, ptn->mountflags & PUIMNT_LOG ? ",log" : "", - ptn->mountflags & PUIMNT_NOAUTO ? "" : ",noauto", + ptn->mountflags & PUIMNT_NOAUTO ? ",noauto" : "", ptn->mountflags & PUIMNT_ASYNC ? ",async" : "", ptn->mountflags & PUIMNT_NOATIME ? ",noatime" : "", ptn->mountflags & PUIMNT_NODEV ? ",nodev" : "",
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:53:03 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #29): usr.sbin/sysinst/disks.c: revision 1.48 When creating the /etc/fstab for new installs, the sense of the "noauto" flag was inverted (editor mishap?) To generate a diff of this commit: cvs rdiff -u -r1.44.2.3 -r1.44.2.4 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:51:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.h Log Message: Pull up following revision(s) (requested by martin in ticket #28): usr.sbin/sysinst/disklabel.c: revision 1.11 usr.sbin/sysinst/target.c: revision 1.10 usr.sbin/sysinst/disks.c: revision 1.47 usr.sbin/sysinst/txtwalk.c: revision 1.2 usr.sbin/sysinst/partitions.h: revision 1.5 usr.sbin/sysinst/txtwalk.h: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/md.h: revision 1.4 usr.sbin/sysinst/gpt.c: revision 1.9 usr.sbin/sysinst/defs.h: revision 1.43 Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.2.1 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/sysinst/arch/ews4800mips/md.h 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/defs.h diff -u src/usr.sbin/sysinst/defs.h:1.42 src/usr.sbin/sysinst/defs.h:1.42.2.1 --- src/usr.sbin/sysinst/defs.h:1.42 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/defs.h Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.42 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: defs.h,v 1.42.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -806,6 +806,7 @@ int target_file_exists_p(const char *); int target_symlink_exists_p(const char *); void unwind_mounts(void); int target_mounted(void); +void umount_root(void); /* from partman.c */ #ifndef NO_PARTMAN Index: src/usr.sbin/sysinst/disklabel.c diff -u src/usr.sbin/sysinst/disklabel.c:1.10 src/usr.sbin/sysinst/disklabel.c:1.10.2.1 --- src/usr.sbin/sysinst/disklabel.c:1.10 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/disklabel.c Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.10 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: disklabel.c,v 1.10.2.1 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -1016,6 +1016,32 @@ disklabel_get_alignment(const struct dis return parts->ptn_alignment; } +static part_id +disklabel_find_by_name(struct disk_partitions *arg, const char *name) +{ + const struct disklabel_disk_partitions *parts = + (const struct disklabel_disk_partitions*)arg; + char *sl, part; + ptrdiff_t n; + part_id pno; + + sl = strrchr(name, '/'); + if (sl == NULL) + return NO_PART; + n = sl - name; + if (strncmp(name, parts->l.d_packname, n) != 0) + return NO_PART; + part = name[n+1]; + if (part < 'a') + return NO_PART; + pno = part - 'a'; + if (pno >= parts->l.d_npartitions) + return NO_PART; + if (parts->l.d_partitions[pno].p_fstype == FS_UNUSED) + return NO_PART; + return pno; +} + static void disklabel_free(struct disk_partitions *arg) { @@ -1034,6 +1060,7 @@ disklabel_parts = { .read_from_disk = disklabel_parts_read, .create_new_for_disk = disklabel_parts_new, .change_disk_geom = disklabel_change_geom, + .find_by_name = disklabel_find_by_name, .get_disk_pack_name = disklabel_get_disk_pack_name, .set_disk_pack_name = disklabel_set_disk_pack_name, .delete_all_partitions = disklabel_delete_all, Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.2 src/usr.sbin/sysinst/disks.c:1.44.2.3 --- src/usr.sbin/sysinst/disks.c:1.44.2.2 Mon Aug 5 04:36:42 2019 +++ src/usr.sbin/sysinst/disks.c Thu Aug 8 05:51:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.2 2019/08/05 04:36:42 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.3 2019/08/08 05:51:43 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -80,13 +81,22 @@ struct disk_desc { daddr_t dd_totsec; }; -static const char name_prefix[] = "NAME="; +#define NAME_PREFIX "NAME=" +static const char name_prefix[] = NAME_PREFIX; + +/* things we could have as /sbin/newfs_* and /sbin/fsck_* */ +static const char *extern_fs_with_chk[] = { + "ext2fs", "lfs", "msdos", "v7fs" +}; + +/* things we could have as
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Thu Aug 8 05:51:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: defs.h disklabel.c disks.c gpt.c partitions.h target.c txtwalk.c txtwalk.h src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.h Log Message: Pull up following revision(s) (requested by martin in ticket #28): usr.sbin/sysinst/disklabel.c: revision 1.11 usr.sbin/sysinst/target.c: revision 1.10 usr.sbin/sysinst/disks.c: revision 1.47 usr.sbin/sysinst/txtwalk.c: revision 1.2 usr.sbin/sysinst/partitions.h: revision 1.5 usr.sbin/sysinst/txtwalk.h: revision 1.2 usr.sbin/sysinst/arch/ews4800mips/md.h: revision 1.4 usr.sbin/sysinst/gpt.c: revision 1.9 usr.sbin/sysinst/defs.h: revision 1.43 Support upgrade of systems using NAME= syntax in /etc/fstab. Make supported file system types dynamic - instead of hardcoding the available types at compile time, check for available newfs_* helper binaries in the actual install environment at runtime. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.2.1 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/disklabel.c cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/usr.sbin/sysinst/gpt.c cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/sysinst/partitions.h cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/target.c cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/txtwalk.c \ src/usr.sbin/sysinst/txtwalk.h cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/sysinst/arch/ews4800mips/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:38:47 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: label.c Log Message: Pull up following revision(s) (requested by martin in ticket #16): usr.sbin/sysinst/label.c: revision 1.12 Fix copy: when we find a FFSv1 filesystem, properly record it that way - so the correct bootblocks get installed on system upgrades. To generate a diff of this commit: cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/label.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:38:47 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: label.c Log Message: Pull up following revision(s) (requested by martin in ticket #16): usr.sbin/sysinst/label.c: revision 1.12 Fix copy: when we find a FFSv1 filesystem, properly record it that way - so the correct bootblocks get installed on system upgrades. To generate a diff of this commit: cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/usr.sbin/sysinst/label.c 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/label.c diff -u src/usr.sbin/sysinst/label.c:1.10.2.1 src/usr.sbin/sysinst/label.c:1.10.2.2 --- src/usr.sbin/sysinst/label.c:1.10.2.1 Fri Aug 2 05:41:46 2019 +++ src/usr.sbin/sysinst/label.c Mon Aug 5 04:38:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.10.2.1 2019/08/02 05:41:46 msaitoh Exp $ */ +/* $NetBSD: label.c,v 1.10.2.2 2019/08/05 04:38:47 msaitoh Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.10.2.1 2019/08/02 05:41:46 msaitoh Exp $"); +__RCSID("$NetBSD: label.c,v 1.10.2.2 2019/08/05 04:38:47 msaitoh Exp $"); #endif #include @@ -1578,7 +1578,7 @@ get_last_mounted(int fd, daddr_t partsta if (fs_type) *fs_type = FS_BSDFFS; if (fs_sub_type) -*fs_sub_type = 2; +*fs_sub_type = 1; continue; case FS_UFS2_MAGIC: case FS_UFS2_MAGIC_SWAPPED:
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:37:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #15): usr.sbin/sysinst/gpt.c: revision 1.8 When reading an existing gpt, match the wedges already existing on the parent device, so we can use them directly if we should proceed with an unmodified partition table. To generate a diff of this commit: cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/usr.sbin/sysinst/gpt.c 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/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.6.2.1 src/usr.sbin/sysinst/gpt.c:1.6.2.2 --- src/usr.sbin/sysinst/gpt.c:1.6.2.1 Mon Aug 5 04:34:54 2019 +++ src/usr.sbin/sysinst/gpt.c Mon Aug 5 04:37:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.6.2.1 2019/08/05 04:34:54 msaitoh Exp $ */ +/* $NetBSD: gpt.c,v 1.6.2.2 2019/08/05 04:37:44 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -228,11 +228,34 @@ gpt_add_info(struct gpt_part_entry *part } } +/* + * Find the partition matching this wedge info and record that we + * have a wedge already. + */ +static void +update_part_from_wedge_info(struct gpt_disk_partitions *parts, +const struct dkwedge_info *dkw) +{ + for (struct gpt_part_entry *p = parts->partitions; p != NULL; + p = p->gp_next) { + if (p->gp_start != dkw->dkw_offset || + (uint64_t)p->gp_size != dkw->dkw_size) + continue; + p->gp_flags |= GPEF_WEDGE; + strlcpy(p->gp_dev_name, dkw->dkw_devname, + sizeof p->gp_dev_name); + return; + } +} + static struct disk_partitions * gpt_read_from_disk(const char *dev, daddr_t start, daddr_t len) { char diskpath[MAXPATHLEN]; int fd; + struct dkwedge_info *dkw; + struct dkwedge_list dkwl; + size_t bufsize, dk; assert(start == 0); assert(have_gpt); @@ -384,6 +407,26 @@ gpt_read_from_disk(const char *dev, dadd parts->dp.free_space -= p->gp_size; } + + /* + * Check if we have any (matching/auto-configured) wedges already + */ + dkw = NULL; + dkwl.dkwl_buf = dkw; + dkwl.dkwl_bufsize = 0; + if (ioctl(fd, DIOCLWEDGES, ) == 0) { + /* do not even try to deal with any races at this point */ + bufsize = dkwl.dkwl_nwedges * sizeof(*dkw); + dkw = malloc(bufsize); + dkwl.dkwl_buf = dkw; + dkwl.dkwl_bufsize = bufsize; + if (dkw != NULL && ioctl(fd, DIOCLWEDGES, ) == 0) { + for (dk = 0; dk < dkwl.dkwl_ncopied; dk++) +update_part_from_wedge_info(parts, [dk]); + } + free(dkw); + } + close(fd); return >dp;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:37:44 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #15): usr.sbin/sysinst/gpt.c: revision 1.8 When reading an existing gpt, match the wedges already existing on the parent device, so we can use them directly if we should proceed with an unmodified partition table. To generate a diff of this commit: cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/usr.sbin/sysinst/gpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:36:42 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #14): usr.sbin/sysinst/disks.c: revision 1.46 Properly handle partitions that we were requested to mount but not newfs. To generate a diff of this commit: cvs rdiff -u -r1.44.2.1 -r1.44.2.2 src/usr.sbin/sysinst/disks.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44.2.1 src/usr.sbin/sysinst/disks.c:1.44.2.2 --- src/usr.sbin/sysinst/disks.c:1.44.2.1 Fri Aug 2 05:41:46 2019 +++ src/usr.sbin/sysinst/disks.c Mon Aug 5 04:36:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44.2.1 2019/08/02 05:41:46 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.2 2019/08/05 04:36:42 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1112,17 +1112,14 @@ make_filesystems(struct install_partitio ptn = >infos[i]; parts = ptn->parts; - if (ptn->size == 0 || parts == NULL) - continue; + if (ptn->size == 0 || parts == NULL|| ptn->type == PT_swap) + continue; if (parts->pscheme->get_part_device(parts, ptn->cur_part_id, devdev, sizeof devdev, , parent_device_only, false) && is_active_rootpart(devdev, partno)) continue; - if (!(ptn->instflags & PUIINST_NEWFS)) - continue; - parts->pscheme->get_part_device(parts, ptn->cur_part_id, devdev, sizeof devdev, , plain_name, true);
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:36:42 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c Log Message: Pull up following revision(s) (requested by martin in ticket #14): usr.sbin/sysinst/disks.c: revision 1.46 Properly handle partitions that we were requested to mount but not newfs. To generate a diff of this commit: cvs rdiff -u -r1.44.2.1 -r1.44.2.2 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:34:54 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #8): usr.sbin/sysinst/gpt.c: revision 1.7 Deal with missing labels when parsing gpt(8) output. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/gpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Mon Aug 5 04:34:54 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: gpt.c Log Message: Pull up following revision(s) (requested by martin in ticket #8): usr.sbin/sysinst/gpt.c: revision 1.7 Deal with missing labels when parsing gpt(8) output. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/gpt.c 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/gpt.c diff -u src/usr.sbin/sysinst/gpt.c:1.6 src/usr.sbin/sysinst/gpt.c:1.6.2.1 --- src/usr.sbin/sysinst/gpt.c:1.6 Sun Jul 28 16:30:36 2019 +++ src/usr.sbin/sysinst/gpt.c Mon Aug 5 04:34:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt.c,v 1.6 2019/07/28 16:30:36 martin Exp $ */ +/* $NetBSD: gpt.c,v 1.6.2.1 2019/08/05 04:34:54 msaitoh Exp $ */ /* * Copyright 2018 The NetBSD Foundation, Inc. @@ -212,8 +212,7 @@ gpt_add_info(struct gpt_part_entry *part } else if (strcmp(tag, "GUID:") == 0) { strlcpy(part->gp_id, val, sizeof(part->gp_id)); } else if (strcmp(tag, "Label:") == 0) { - if (strlen(val) > 0) - strlcpy(part->gp_label, val, sizeof(part->gp_label)); + strlcpy(part->gp_label, val, sizeof(part->gp_label)); } else if (strcmp(tag, "Attributes:") == 0) { char *n;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:45:54 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #6): usr.sbin/sysinst/bsddisklabel.c: revision 1.26 If we can not fit a planned partition, retry with a bit more slope in size. To generate a diff of this commit: cvs rdiff -u -r1.23.2.1 -r1.23.2.2 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:45:54 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #6): usr.sbin/sysinst/bsddisklabel.c: revision 1.26 If we can not fit a planned partition, retry with a bit more slope in size. To generate a diff of this commit: cvs rdiff -u -r1.23.2.1 -r1.23.2.2 src/usr.sbin/sysinst/bsddisklabel.c 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/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.1 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.2 --- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.1 Fri Aug 2 05:43:20 2019 +++ src/usr.sbin/sysinst/bsddisklabel.c Fri Aug 2 05:45:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.23.2.1 2019/08/02 05:43:20 msaitoh Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.23.2.2 2019/08/02 05:45:54 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1424,8 +1424,12 @@ apply_settings_to_partitions(struct pm_d continue; size_t cnt = wanted->parts->pscheme->get_free_spaces( - wanted->parts, , 1, want->size-2*align, align, from, + wanted->parts, , 1, want->size-align, align, from, -1); + if (cnt == 0) + cnt = wanted->parts->pscheme->get_free_spaces( + wanted->parts, , 1, + want->size-5*align, align, from, -1); if (cnt == 0) continue; /* no free space for this partition */
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:43:21 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #5): usr.sbin/sysinst/bsddisklabel.c: revision 1.24 usr.sbin/sysinst/bsddisklabel.c: revision 1.25 PR 54423: fix handling of user defined partitions PR 54423: complete initialization of install info for user defined partitions To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.2.1 src/usr.sbin/sysinst/bsddisklabel.c 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/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.23 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.1 --- src/usr.sbin/sysinst/bsddisklabel.c:1.23 Sun Jul 28 16:30:36 2019 +++ src/usr.sbin/sysinst/bsddisklabel.c Fri Aug 2 05:43:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.23 2019/07/28 16:30:36 martin Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.23.2.1 2019/08/02 05:43:20 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -365,24 +365,25 @@ add_other_ptn_size(menudesc *menu, void /* we need absolute mount paths */ memmove(new_mp+1, new_mp, sizeof(new_mp)-1); new_mp[0] = '/'; - /* duplicates? */ - bool duplicate = false; - for (size_t i = 0; i < pset->num; i++) { -if (strcmp(pset->infos[i].mount, -new_mp) == 0) { - args = new_mp; - err = str_arg_subst( - msg_string(MSG_mp_already_exists), - 1, ); - err_msg_win(err); - free(err); - duplicate = true; - break; -} - } - if (!duplicate) + } + + /* duplicates? */ + bool duplicate = false; + for (size_t i = 0; i < pset->num; i++) { + if (strcmp(pset->infos[i].mount, + new_mp) == 0) { + args = new_mp; +err = str_arg_subst( +msg_string(MSG_mp_already_exists), +1, ); +err_msg_win(err); +free(err); +duplicate = true; break; + } } + if (!duplicate) + break; } m = realloc(pset->menu_opts, (pset->num+4)*sizeof(*pset->menu_opts)); @@ -400,6 +401,11 @@ add_other_ptn_size(menudesc *menu, void p += pset->num; memset(m, 0, sizeof(*m)); memset(p, 0, sizeof(*p)); + p->parts = pset->parts; + p->cur_part_id = NO_PART; + p->type = PT_root; + p->fs_type = FS_BSDFFS; + p->fs_version = 2; strncpy(p->mount, new_mp, sizeof(p->mount)); menu->cursel = pset->num;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:43:21 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c Log Message: Pull up following revision(s) (requested by martin in ticket #5): usr.sbin/sysinst/bsddisklabel.c: revision 1.24 usr.sbin/sysinst/bsddisklabel.c: revision 1.25 PR 54423: fix handling of user defined partitions PR 54423: complete initialization of install info for user defined partitions To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.2.1 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:41:46 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c label.c target.c Log Message: Pull up following revision(s) (requested by martin in ticket #4): usr.sbin/sysinst/target.c: revision 1.9 usr.sbin/sysinst/disks.c: revision 1.45 usr.sbin/sysinst/label.c: revision 1.11 Do not strip the trailing / on root mounts when evaluation "last mounted on". Fix some /dev/ and raw vs. block device confusion on system upgrades. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.44.2.1 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/target.c 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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.44 src/usr.sbin/sysinst/disks.c:1.44.2.1 --- src/usr.sbin/sysinst/disks.c:1.44 Thu Jul 25 13:11:15 2019 +++ src/usr.sbin/sysinst/disks.c Fri Aug 2 05:41:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.44 2019/07/25 13:11:15 martin Exp $ */ +/* $NetBSD: disks.c,v 1.44.2.1 2019/08/02 05:41:46 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -80,6 +80,8 @@ struct disk_desc { daddr_t dd_totsec; }; +static const char name_prefix[] = "NAME="; + /* Local prototypes */ static int foundffs(struct data *, size_t); #ifdef USE_SYSVBFS @@ -1399,23 +1401,37 @@ done_with_disks: return 0; } - - static int /*ARGSUSED*/ foundffs(struct data *list, size_t num) { int error; + char rbuf[PATH_MAX], buf[PATH_MAX]; + const char *rdev, *dev; if (num < 2 || strcmp(list[1].u.s_val, "/") == 0 || strstr(list[2].u.s_val, "noauto") != NULL) return 0; - error = fsck_preen(list[0].u.s_val, "ffs", false); + /* need the raw device for fsck_preen */ + if (strncmp(list[0].u.s_val, name_prefix, sizeof(name_prefix)-1) + != 0) { + strcpy(rbuf, "/dev/r"); + strlcat(rbuf, list[0].u.s_val, sizeof(rbuf)); + rdev = rbuf; + strcpy(buf, "/dev/"); + strlcat(buf, list[0].u.s_val, sizeof(buf)); + dev = buf; + } else { + rdev = list[0].u.s_val; + dev = list[0].u.s_val; + } + + error = fsck_preen(rdev, "ffs", false); if (error != 0) return error; - error = target_mount("", list[0].u.s_val, list[1].u.s_val); + error = target_mount("", dev, list[1].u.s_val); if (error != 0) { msg_fmt_display(MSG_mount_failed, "%s", list[0].u.s_val); if (!ask_noyes(NULL)) Index: src/usr.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.10 src/usr.sbin/sysinst/label.c:1.10.2.1 --- src/usr.sbin/sysinst/label.c:1.10 Fri Jul 26 08:18:47 2019 +++ src/usr.sbin/sysinst/label.c Fri Aug 2 05:41:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.10 2019/07/26 08:18:47 martin Exp $ */ +/* $NetBSD: label.c,v 1.10.2.1 2019/08/02 05:41:46 msaitoh Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.10 2019/07/26 08:18:47 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.10.2.1 2019/08/02 05:41:46 msaitoh Exp $"); #endif #include @@ -1487,6 +1487,12 @@ canonicalize_last_mounted(char *path) { char *p; + if (path == NULL) + return; + + if (strcmp(path, "/") == 0) + return; /* in this case a "trailing" slash is allowed */ + for (;;) { p = strrchr(path, '/'); if (p == NULL) Index: src/usr.sbin/sysinst/target.c diff -u src/usr.sbin/sysinst/target.c:1.8 src/usr.sbin/sysinst/target.c:1.8.2.1 --- src/usr.sbin/sysinst/target.c:1.8 Tue Jul 23 18:13:40 2019 +++ src/usr.sbin/sysinst/target.c Fri Aug 2 05:41:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: target.c,v 1.8 2019/07/23 18:13:40 martin Exp $ */ +/* $NetBSD: target.c,v 1.8.2.1 2019/08/02 05:41:46 msaitoh Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -71,7 +71,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: target.c,v 1.8 2019/07/23 18:13:40 martin Exp $"); +__RCSID("$NetBSD: target.c,v 1.8.2.1 2019/08/02 05:41:46 msaitoh Exp $"); #endif /* @@ -209,6 +209,9 @@ target_already_root(void) bool is_root_part_mount(const char *last_mounted) { + if (last_mounted == NULL) + return false; + return strcmp(last_mounted, "/") == 0 || strcmp(last_mounted, "/targetroot") == 0 || strcmp(last_mounted, "/altroot") == 0;
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Fri Aug 2 05:41:46 UTC 2019 Modified Files: src/usr.sbin/sysinst [netbsd-9]: disks.c label.c target.c Log Message: Pull up following revision(s) (requested by martin in ticket #4): usr.sbin/sysinst/target.c: revision 1.9 usr.sbin/sysinst/disks.c: revision 1.45 usr.sbin/sysinst/label.c: revision 1.11 Do not strip the trailing / on root mounts when evaluation "last mounted on". Fix some /dev/ and raw vs. block device confusion on system upgrades. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.44.2.1 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.10 -r1.10.2.1 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.