CVS commit: [netbsd-9] src/usr.sbin/sysinst

2021-05-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 12 06:53:56 UTC 2021

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: label.c mbr.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1271):
usr.sbin/sysinst/mbr.c: revision 1.39
usr.sbin/sysinst/label.c: revision 1.33
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.21
For FS_MSDOS report the MBR type as fs_sub_type.
Keep MSDOS partition size and subtype consistent - some u-boot are picky.
Do not allow editing of start/size/fs-type for partitions that
are already carved in stone (e.g. defined in an outer MBR while we are
editing the inner disklabel).


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.19.2.8 -r1.19.2.9 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.8.2.6 -r1.8.2.7 src/usr.sbin/sysinst/arch/evbarm/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/label.c
diff -u src/usr.sbin/sysinst/label.c:1.10.2.6 src/usr.sbin/sysinst/label.c:1.10.2.7
--- src/usr.sbin/sysinst/label.c:1.10.2.6	Thu Oct 15 19:36:51 2020
+++ src/usr.sbin/sysinst/label.c	Wed May 12 06:53:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.10.2.6 2020/10/15 19:36:51 bouyer Exp $	*/
+/*	$NetBSD: label.c,v 1.10.2.7 2021/05/12 06:53:55 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.6 2020/10/15 19:36:51 bouyer Exp $");
+__RCSID("$NetBSD: label.c,v 1.10.2.7 2021/05/12 06:53:55 msaitoh Exp $");
 #endif
 
 #include 
@@ -1070,9 +1070,23 @@ update_edit_ptn_menu(menudesc *m, void *
 			edit->pset->parts, edit->id, attr_no))
 continue;
 		}
+		/*
+		 * Do not allow editing of size/start/type when partition
+		 * is defined in some outer partition table already
+		 */
+		if ((edit->pset->infos[edit->index].flags & PUIFLG_IS_OUTER)
+		&& (m->opts[i].opt_action == edit_fs_type
+			|| m->opts[i].opt_action == edit_fs_start
+			|| m->opts[i].opt_action == edit_fs_size))
+continue;
 		/* Ok: we want this one */
 		m->opts[i].opt_flags &= ~OPT_IGNORE;
 	}
+
+	/* Avoid starting at a (now) disabled menu item */
+	while (m->cursel >= 0 && m->cursel < m->numopts
+	&& (m->opts[m->cursel].opt_flags & OPT_IGNORE))
+		m->cursel++;
 }
 
 static void
@@ -1123,7 +1137,10 @@ draw_edit_ptn_line(menudesc *m, int opt,
 
 	if (m->opts[opt].opt_flags & OPT_IGNORE
 	&& (opt != 3 || edit->info.fs_type == FS_UNUSED)
-	&& m->opts[opt].opt_action != edit_ptn_custom_type) {
+	&& m->opts[opt].opt_action != edit_ptn_custom_type
+	&& m->opts[opt].opt_action != edit_fs_type
+	&& m->opts[opt].opt_action != edit_fs_start
+	&& m->opts[opt].opt_action != edit_fs_size) {
 		wprintw(m->mw, "%*s -", col_width, "");
 		return;
 	}

Index: src/usr.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.19.2.8 src/usr.sbin/sysinst/mbr.c:1.19.2.9
--- src/usr.sbin/sysinst/mbr.c:1.19.2.8	Wed Nov  4 13:27:08 2020
+++ src/usr.sbin/sysinst/mbr.c	Wed May 12 06:53:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.19.2.8 2020/11/04 13:27:08 sborrill Exp $ */
+/*	$NetBSD: mbr.c,v 1.19.2.9 2021/05/12 06:53:55 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1401,6 +1401,7 @@ mbr_do_get_part_info(const struct disk_p
 		case MBR_PTYPE_SPEEDSTOR_16S:
 		case MBR_PTYPE_EFI:
 			info->fs_type = FS_MSDOS;
+			info->fs_sub_type = mp->mbrp_type;
 			break;
 		case MBR_PTYPE_LNXEXT2:
 			info->fs_type = FS_EX2FS;

Index: src/usr.sbin/sysinst/arch/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.6 src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.7
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.6	Sun Nov 29 11:36:46 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Wed May 12 06:53:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8.2.6 2020/11/29 11:36:46 martin Exp $ */
+/*	$NetBSD: md.c,v 1.8.2.7 2021/05/12 06:53:55 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -337,10 +337,12 @@ bool
 md_parts_use_wholedisk(struct disk_partitions *parts)
 {
 	struct disk_part_info boot_part = {
-		.size = boardtype == BOARD_TYPE_NORMAL ? 
+		.size = boardtype == BOARD_TYPE_NORMAL ?
 		PART_BOOT_LARGE/parts->bytes_per_sector :
 		PART_BOOT/parts->bytes_per_sector,
-		.fs_type = PART_BOOT_TYPE, .fs_sub_type = MBR_PTYPE_FAT16L,
+		.fs_type = PART_BOOT_TYPE,
+		.fs_sub_type = boardtype == BOARD_TYPE_NORMAL ?
+		MBR_PTYPE_FAT32L : MBR_PTYPE_FAT16L,
 	};
 
 	return parts_use_wholedisk(parts, 1, _part);
@@ -372,15 +374,15 @@ evbarm_part_defaults(struct pm_devs *my_
 {
 	size_t i;
 
-	if (boardtype != BOARD_TYPE_NORMAL)
-		return;
-
 	for (i = 0; i < num_usage_infos; i++) {
 		if (infos[i].fs_type == PART_BOOT_TYPE &&
 		

CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/evbarm

2020-11-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov 29 11:36:46 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1137):

usr.sbin/sysinst/arch/evbarm/md.c: revision 1.20

Make sure the kernel set is selected, even if extracting parts of it
manually.


To generate a diff of this commit:
cvs rdiff -u -r1.8.2.5 -r1.8.2.6 src/usr.sbin/sysinst/arch/evbarm/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/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.5 src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.6
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.5	Thu Oct 15 19:36:52 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Sun Nov 29 11:36:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8.2.5 2020/10/15 19:36:52 bouyer Exp $ */
+/*	$NetBSD: md.c,v 1.8.2.6 2020/11/29 11:36:46 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -87,6 +87,7 @@ md_init_set_status(int flags)
 	 * manually later, just fetch the kernel set, do not
 	 * unpack it.
 	 */
+	set_kernel_set(SET_KERNEL_1);
 	set_noextract_set(SET_KERNEL_1);
 }
 



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2020-11-05 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Nov  5 08:10:21 UTC 2020

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: menus.mi msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1121):
usr.sbin/sysinst/menus.mi:  revision 1.22-1.23
usr.sbin/sysinst/msg.mi.de: revision 1.25-1.26
usr.sbin/sysinst/msg.mi.en: revision 1.33-1.34
usr.sbin/sysinst/msg.mi.pl: revision 1.33-1.34
usr.sbin/sysinst/msg.mi.es: revision 1.27-1.28
usr.sbin/sysinst/msg.mi.fr: revision 1.32-1.33
usr.sbin/sysinst/util.c:revision 1.49-1.52

- When looking for available CD media, skip those that are already mounted.
- When no medium with sets is found, show a new error message and return
  to the source selection menu.
- Rearrange all source option menus to have the proper set suffix available
  (either .tgz or .tar.xz).
- Relax an assertion, the first getvfsstat() call may overestimate the file
  systems visible to us. Fixes PR 55752
- When we did not magically find any CD medium with sets, offer a manual
  override (so ISO images on USB sticks or Xen's xbd(4) work).


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/usr.sbin/sysinst/menus.mi
cvs rdiff -u -r1.13.2.8 -r1.13.2.9 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.19.2.9 -r1.19.2.10 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.14.2.8 -r1.14.2.9 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17.2.9 -r1.17.2.10 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20.2.9 -r1.20.2.10 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.29.2.7 -r1.29.2.8 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/menus.mi
diff -u src/usr.sbin/sysinst/menus.mi:1.19.2.1 src/usr.sbin/sysinst/menus.mi:1.19.2.2
--- src/usr.sbin/sysinst/menus.mi:1.19.2.1	Tue Jan 28 10:17:58 2020
+++ src/usr.sbin/sysinst/menus.mi	Thu Nov  5 08:10:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: menus.mi,v 1.19.2.1 2020/01/28 10:17:58 msaitoh Exp $	*/
+/*	$NetBSD: menus.mi,v 1.19.2.2 2020/11/05 08:10:21 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -362,8 +362,10 @@ menu distset, title MSG_Select_your_dist
 
 menu ftpsource, y=-4, x=0, w=70, no box, no clear,
 	exitstring MSG_Get_Distribution;
-	display action { msg_fmt_display(MSG_ftpsource, "%s",
-	url_proto((uintptr_t)((arg_rv*)arg)->arg)); };
+	display action {
+		msg_display_subst(MSG_ftpsource, 2, "." SETS_TAR_SUFF,
+		url_proto((uintptr_t)((arg_rv*)arg)->arg));
+	};
 	option {src_legend(menu, MSG_Host, ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg]);},
 		action { src_prompt(MSG_Host, ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg], sizeof ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg]); };
 	option {src_legend(menu, MSG_Base_dir, ftp.dir);},
@@ -412,7 +414,8 @@ menu ftpsource, y=-4, x=0, w=70, no box,
 
 menu nfssource, y=-4, x=0, w=70, no box, no clear,
 	exitstring MSG_Get_Distribution;
-	display action { msg_display(MSG_nfssource); };
+	display action { const char suff[] = "." SETS_TAR_SUFF;
+		msg_display_subst(MSG_nfssource, 1, ); };
 	option {src_legend(menu, MSG_Host, nfs_host);},
 		action { src_prompt(MSG_Host, nfs_host, sizeof nfs_host); };
 	option {src_legend(menu, MSG_Base_dir, nfs_dir);},
@@ -459,17 +462,20 @@ menu floppysource, y=-4, x=0, w=70, no b
 	option MSG_exit_menu_generic, exit, action { *((int*)arg) = SET_RETRY; };
 
 menu cdromsource, y=-4, x=0, w=70, no box, no clear, exitstring MSG_Continue;
-	display action { msg_display(MSG_cdromsource); };
+	display action { const char suff[] = "." SETS_TAR_SUFF;
+		msg_display_add_subst(MSG_cdromsource, 1, ); };
 	option {src_legend(menu, MSG_Device, cdrom_dev);},
 		action { src_prompt(MSG_dev, cdrom_dev, sizeof cdrom_dev); };
 	option {src_legend(menu, MSG_Set_dir_bin, set_dir_bin);},
 		action { src_prompt(MSG_Set_dir_bin, set_dir_bin, sizeof set_dir_bin); };
 	option {src_legend(menu, MSG_Set_dir_src, set_dir_src);},
 		action { src_prompt(MSG_Set_dir_src, set_dir_src, sizeof set_dir_src); };
-	option MSG_exit_menu_generic, exit, action { *((int*)arg) = SET_RETRY; };
+	option MSG_abort_install, exit, action { *((int*)arg) = SET_ABANDON; };
+	option MSG_source_sel_retry, exit, action { *((int*)arg) = SET_RETRY; };
 
 menu localfssource, y=-4, x=0, w=70, no box, no clear, exitstring MSG_Continue;
-	display action { msg_display(MSG_localfssource); };
+	display action { const char suff[] = "." SETS_TAR_SUFF;
+		msg_display_subst(MSG_localfssource, 1, ); };
 	option {src_legend(menu, MSG_Device, localfs_dev);},
 		action { src_prompt(MSG_dev, localfs_dev, sizeof localfs_dev);};
 	option {src_legend(menu, MSG_File_system, localfs_fs);},
@@ -483,7 +489,8 @@ menu localfssource, y=-4, x=0, w=70, no 
 	

CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/i386

2020-11-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Nov  4 13:31:23 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1120):
usr.sbin/sysinst/arch/i386/md.c:revision 1.33

Do not force bootselector MBR code for installs with only a single named
partition.


To generate a diff of this commit:
cvs rdiff -u -r1.20.2.7 -r1.20.2.8 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.7 src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.8
--- src/usr.sbin/sysinst/arch/i386/md.c:1.20.2.7	Thu Oct 15 19:36:51 2020
+++ src/usr.sbin/sysinst/arch/i386/md.c	Wed Nov  4 13:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.20.2.7 2020/10/15 19:36:51 bouyer Exp $ */
+/*	$NetBSD: md.c,v 1.20.2.8 2020/11/04 13:31:23 sborrill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -573,12 +573,14 @@ md_check_mbr(struct disk_partitions *par
 	}
 
 	/* Sort out the name of the mbr code we need */
-	if (names > 0 || fl & (NETBSD_NAMED | ACTIVE_NAMED)) {
+	if (names > 1 ||
+	(parts->num_part > 1 && (fl & (NETBSD_NAMED | ACTIVE_NAMED {
 		/* Need bootselect code */
 		fl |= MBR_BS_ACTIVE;
 		bootcode = fl & MBR_BS_EXTLBA ? _PATH_BOOTEXT : _PATH_BOOTSEL;
-	} else
+	} else {
 		bootcode = _PATH_MBR;
+	}
 
 	fl &=  MBR_BS_ACTIVE | MBR_BS_EXTLBA;
 



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2020-11-04 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Nov  4 13:27:08 UTC 2020

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: mbr.c

Log Message:
Pull up the following revisions(s) (requested by martin in ticket #1119):
usr.sbin/sysinst/mbr.c: revision 1.37

Do not force alignment of the first partition by default (which is
treated special to skip the first track), unless an existing partition
table hints at it.


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.7 -r1.19.2.8 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.7 src/usr.sbin/sysinst/mbr.c:1.19.2.8
--- src/usr.sbin/sysinst/mbr.c:1.19.2.7	Thu Oct 15 19:36:51 2020
+++ src/usr.sbin/sysinst/mbr.c	Wed Nov  4 13:27:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.19.2.7 2020/10/15 19:36:51 bouyer Exp $ */
+/*	$NetBSD: mbr.c,v 1.19.2.8 2020/11/04 13:27:08 sborrill Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -889,16 +889,15 @@ mbr_init_default_alignments(struct mbr_d
 	if (parts->dp.disk_size < 0)
 		return;
 
+	parts->ptn_0_offset = parts->geo_sec;
+
 	/* Use 1MB offset/alignemnt for large (>128GB) disks */
 	if (parts->dp.disk_size > HUGE_DISK_SIZE) {
 		parts->ptn_alignment = 2048;
-		parts->ptn_0_offset = 2048;
 	} else if (parts->dp.disk_size > TINY_DISK_SIZE) {
 		parts->ptn_alignment = 64;
-		parts->ptn_0_offset = parts->geo_sec;
 	} else {
 		parts->ptn_alignment = 1;
-		parts->ptn_0_offset = parts->geo_sec;
 	}
 	parts->ext_ptn_alignment = track;
 }



CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/alpha

2020-03-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  9 18:50:19 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/alpha [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #777):
usr.sbin/sysinst/arch/alpha/md.c: 1.8
The (unused) md_pre_disklabel() function needs to return success, otherwise
all installations will be aborted.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 src/usr.sbin/sysinst/arch/alpha/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/alpha/md.c
diff -u src/usr.sbin/sysinst/arch/alpha/md.c:1.6.2.1 src/usr.sbin/sysinst/arch/alpha/md.c:1.6.2.2
--- src/usr.sbin/sysinst/arch/alpha/md.c:1.6.2.1	Tue Dec 17 09:44:50 2019
+++ src/usr.sbin/sysinst/arch/alpha/md.c	Mon Mar  9 18:50:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.6.2.1 2019/12/17 09:44:50 msaitoh Exp $ */
+/*	$NetBSD: md.c,v 1.6.2.2 2020/03/09 18:50:19 snj Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -126,7 +126,7 @@ bool
 md_pre_disklabel(struct install_partition_desc *install,
 struct disk_partitions *part)
 {
-	return 0;
+	return true;
 }
 
 /*



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2020-02-10 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Feb 10 21:39:38 UTC 2020

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c defs.h disklabel.c
disks.c mbr.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl
partman.c target.c txtwalk.c upgrade.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mac68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-9]: md.c msg.md.de msg.md.en
msg.md.es msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/x68k [netbsd-9]: md.c msg.md.en

Log Message:
Pull up following revision(s) (requested by martin in ticket #693):
usr.sbin/sysinst/arch/x68k/msg.md.en: revision 1.2
usr.sbin/sysinst/arch/x68k/md.c: revision 1.10
usr.sbin/sysinst/arch/mvme68k/msg.md.fr: revision 1.2
usr.sbin/sysinst/arch/x68k/msg.md.en: revision 1.3
usr.sbin/sysinst/arch/mvme68k/msg.md.fr: revision 1.3
usr.sbin/sysinst/msg.mi.en: revision 1.28
usr.sbin/sysinst/arch/hp300/md.c: revision 1.10
usr.sbin/sysinst/msg.mi.es: revision 1.22
usr.sbin/sysinst/target.c: revision 1.12
usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.10
usr.sbin/sysinst/arch/i386/md.c: revision 1.30
usr.sbin/sysinst/arch/mvme68k/msg.md.pl: revision 1.2
usr.sbin/sysinst/arch/mvme68k/msg.md.pl: revision 1.3
usr.sbin/sysinst/bsddisklabel.c: revision 1.39
usr.sbin/sysinst/arch/mvme68k/msg.md.de: revision 1.2
usr.sbin/sysinst/arch/mac68k/md.c: revision 1.9
usr.sbin/sysinst/disklabel.c: revision 1.35
usr.sbin/sysinst/arch/mvme68k/msg.md.de: revision 1.3
usr.sbin/sysinst/defs.h: revision 1.55
usr.sbin/sysinst/disks.c: revision 1.63
usr.sbin/sysinst/disks.c: revision 1.64
usr.sbin/sysinst/mbr.c: revision 1.31
usr.sbin/sysinst/disks.c: revision 1.65
usr.sbin/sysinst/txtwalk.c: revision 1.3
usr.sbin/sysinst/txtwalk.c: revision 1.4
usr.sbin/sysinst/arch/mvme68k/msg.md.en: revision 1.2
usr.sbin/sysinst/arch/mvme68k/msg.md.en: revision 1.3
usr.sbin/sysinst/msg.mi.fr: revision 1.26
usr.sbin/sysinst/msg.mi.pl: revision 1.29
usr.sbin/sysinst/arch/mvme68k/msg.md.es: revision 1.2
usr.sbin/sysinst/upgrade.c: revision 1.15
usr.sbin/sysinst/arch/mvme68k/msg.md.es: revision 1.3
usr.sbin/sysinst/upgrade.c: revision 1.16
usr.sbin/sysinst/partman.c: revision 1.50
usr.sbin/sysinst/msg.mi.de: revision 1.21
remove unused "emptypart" message (or moved to ifdef notyet area)
PR install/54921: message "ordering" takes a %s argument.
PR install/54921: skip non-user partitions when checking for overlaps
bootxx_name() - fix oversight in previous change (do not assume first
partition is the root partition)
PR install/54934: always use -f on the installboot invocation. We come
here post-newfs (and maybe should have dd'd zeros to the start of the
disk before newfs instead).
Remove a bogus assert: when reading disklabel partitions and the outer
(MBR) partitioning has changed, but the changes have not yet been written
back to disk, we need to ignore the kernels idea of the disklabel and
instead continue with an empty one.
Deal with partitioning schemes having no inner counterpart.
Avoid NULL derefs.
Do not assum a partitioning scheme that supports innner partitions always
needs to actually have such partitions defined.
PR bin/54944: deal with escaped spaces in NAME= syntax in /etc/fstab.
PR bin/54944: explicitly reject GPT protective MBRs.
PR bin/54944: make the "explicit single wedge" selection also work for
upgrades.
Reformat a query to add an automatically detected swap partition
so it fits on narrow screens.
Make re-install sets also work for an explicit selected root wedge
Fix copy in previous - from kre.
Only a single partition can ever have the "extend" flag (grow to available
size).
Do not use -P for tar extractions - the in tree tar has been fixed.
Finish conversion to generic partitioning backend


To generate a diff of this commit:
cvs rdiff -u -r1.23.2.9 -r1.23.2.10 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.42.2.6 -r1.42.2.7 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.10.2.8 -r1.10.2.9 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.44.2.13 -r1.44.2.14 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.19.2.5 -r1.19.2.6 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.13.2.6 -r1.13.2.7 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.19.2.7 -r1.19.2.8 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.14.2.6 -r1.14.2.7 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17.2.7 -r1.17.2.8 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20.2.7 -r1.20.2.8 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.41.2.4 -r1.41.2.5 src/usr.sbin/sysinst/partman.c
cvs rdiff -u -r1.8.2.3 -r1.8.2.4 

CVS commit: [netbsd-9] src/usr.sbin/sysinst/arch/evbarm

2020-01-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan 29 23:31:30 UTC 2020

Modified Files:
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #673):
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.15
Do not compare a char array to NULL, test for empty string instead.


To generate a diff of this commit:
cvs rdiff -u -r1.8.2.3 -r1.8.2.4 src/usr.sbin/sysinst/arch/evbarm/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/evbarm/md.c
diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.3 src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.4
--- src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.3	Tue Jan 28 10:17:58 2020
+++ src/usr.sbin/sysinst/arch/evbarm/md.c	Wed Jan 29 23:31:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8.2.3 2020/01/28 10:17:58 msaitoh Exp $ */
+/*	$NetBSD: md.c,v 1.8.2.4 2020/01/29 23:31:30 msaitoh Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -352,7 +352,7 @@ evbarm_part_defaults(struct pm_devs *my_
 
 	for (i = 0; i < num_usage_infos; i++) {
 		if (infos[i].fs_type == PART_BOOT_TYPE &&
-		infos[i].mount != NULL &&
+		infos[i].mount[0] != 0 &&
 		strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
 			infos[i].size = PART_BOOT_LARGE;
 			return;



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-12-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec 17 09:48:30 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by martin in ticket #561):
usr.sbin/sysinst/Makefile.inc: revision 1.31
Fix the pattern creating the relative path for distribution sets
on branches: we missed the potential numbers in suffixes, like _RC1.


To generate a diff of this commit:
cvs rdiff -u -r1.22.2.1 -r1.22.2.2 src/usr.sbin/sysinst/Makefile.inc

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/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.22.2.1 src/usr.sbin/sysinst/Makefile.inc:1.22.2.2
--- src/usr.sbin/sysinst/Makefile.inc:1.22.2.1	Sun Nov 17 13:45:26 2019
+++ src/usr.sbin/sysinst/Makefile.inc	Tue Dec 17 09:48:30 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.22.2.1 2019/11/17 13:45:26 msaitoh Exp $
+#	$NetBSD: Makefile.inc,v 1.22.2.2 2019/12/17 09:48:30 msaitoh Exp $
 #
 # Makefile for sysinst
 
@@ -98,10 +98,10 @@ CPPFLAGS+= -DSYSINST_HTTP_HOST=\"nycdn.N
 CPPFLAGS+= -DREL_PATH=\"HEAD\"
 CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/\.99\.[0-9]*[_A-Z]*$//}.0\""
 .elif (${DISTRIBVER:M*.[0-9].[0-9]*})
-CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//:S/./-/}\"
+CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*[0-9]*$//:S/./-/}\"
 CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
 .elif (${DISTRIBVER:M*.[0-9]*})
-CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*$//}\"
+CPPFLAGS+= -DREL_PATH=\"netbsd-${DISTRIBVER:C/\.[0-9][_A-Z]*[0-9]*$//}\"
 CPPFLAGS+= -DPKG_SUBDIR="\"${DISTRIBVER:C/_.*$//}\""
 .endif
 .endif



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-12-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec 17 09:44:52 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c defs.h disklabel.c
disks.c gpt.c label.c main.c mbr.c msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl partitions.c partitions.h partman.c wskbd.c
src/usr.sbin/sysinst/arch/alpha [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/amiga [netbsd-9]: md.h
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c md.h
src/usr.sbin/sysinst/arch/emips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c menus.md.en
menus.md.es menus.md.fr menus.md.pl
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mipsco [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/pmax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/x68k [netbsd-9]: md.c md.h

Log Message:
Pull up following revision(s) (requested by martin in ticket #560):
usr.sbin/sysinst/partitions.h: revision 1.11
usr.sbin/sysinst/defs.h: revision 1.49
usr.sbin/sysinst/mbr.c: revision 1.23
usr.sbin/sysinst/msg.mi.en: revision 1.26
usr.sbin/sysinst/disks.c: revision 1.58
usr.sbin/sysinst/arch/evbarm/menus.md.pl: revision 1.2
usr.sbin/sysinst/msg.mi.es: revision 1.20
usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.9
usr.sbin/sysinst/gpt.c: revision 1.13
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.10
usr.sbin/sysinst/arch/arc/md.c: revision 1.10
usr.sbin/sysinst/disklabel.c: revision 1.18
usr.sbin/sysinst/bsddisklabel.c: revision 1.33
usr.sbin/sysinst/disklabel.c: revision 1.19
usr.sbin/sysinst/main.c: revision 1.19
usr.sbin/sysinst/partman.c: revision 1.45
usr.sbin/sysinst/arch/alpha/md.c: revision 1.7
usr.sbin/sysinst/msg.mi.de: revision 1.19
usr.sbin/sysinst/arch/evbarm/menus.md.en: revision 1.2
usr.sbin/sysinst/arch/x68k/md.h: revision 1.4
usr.sbin/sysinst/arch/x68k/md.c: revision 1.9
usr.sbin/sysinst/arch/evbarm/menus.md.es: revision 1.2
usr.sbin/sysinst/wskbd.c: revision 1.4
usr.sbin/sysinst/label.c: revision 1.15
usr.sbin/sysinst/arch/amiga/md.h: revision 1.5
usr.sbin/sysinst/label.c: revision 1.16
usr.sbin/sysinst/arch/hp300/md.c: revision 1.9
usr.sbin/sysinst/arch/emips/md.c: revision 1.8
usr.sbin/sysinst/label.c: revision 1.17
usr.sbin/sysinst/arch/pmax/md.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.6
usr.sbin/sysinst/arch/prep/md.c: revision 1.10
usr.sbin/sysinst/arch/mipsco/md.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.8
usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.5
usr.sbin/sysinst/disklabel.c: revision 1.20
usr.sbin/sysinst/arch/evbarm/menus.md.fr: revision 1.2
usr.sbin/sysinst/msg.mi.fr: revision 1.24
usr.sbin/sysinst/disklabel.c: revision 1.21
usr.sbin/sysinst/partitions.h: revision 1.9
usr.sbin/sysinst/msg.mi.pl: revision 1.27
usr.sbin/sysinst/disklabel.c: revision 1.22
usr.sbin/sysinst/disklabel.c: revision 1.23
usr.sbin/sysinst/arch/i386/md.c: revision 1.27
usr.sbin/sysinst/disklabel.c: revision 1.24
usr.sbin/sysinst/disklabel.c: revision 1.25
usr.sbin/sysinst/arch/cobalt/md.h: revision 1.5
usr.sbin/sysinst/disklabel.c: revision 1.26
usr.sbin/sysinst/disklabel.c: revision 1.27
usr.sbin/sysinst/partitions.h: revision 1.10
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.10
PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
Get rid of the evbarm preliminary menu: do not bother to ask the user
whether this is a RPi - query the FDT instead.
PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
For now rely on the kernel mapping native RDB partitions.
Fix detection of existing disklabels in the case when we only have
the disklabel partitioning scheme available.
Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous)
Fix inverted comparison
Do not try to change the keyboard layout if we are not running on the
console.
When trying to tell a fictious but empty label from a 

CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-12-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Dec  9 19:33:26 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #538):
usr.sbin/sysinst/bsddisklabel.c: revision 1.32
PR install/54745: fix confusion about absolut and NetBSD-partition
relative offsets.


To generate a diff of this commit:
cvs rdiff -u -r1.23.2.6 -r1.23.2.7 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.6 src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.7
--- src/usr.sbin/sysinst/bsddisklabel.c:1.23.2.6	Sun Nov 17 13:45:26 2019
+++ src/usr.sbin/sysinst/bsddisklabel.c	Mon Dec  9 19:33:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.23.2.6 2019/11/17 13:45:26 msaitoh Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.23.2.7 2019/12/09 19:33:25 bouyer Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1342,7 +1342,8 @@ apply_settings_to_partitions(struct pm_d
 	/*
 	 * Now add new inner partitions (and cloned partitions)
 	 */
-	for (i = 0; i < wanted->num && from < wanted->parts->disk_size; i++) {
+	for (i = 0; i < wanted->num && from < 
+	(wanted->parts->disk_size + wanted->parts->disk_start); i++) {
 		struct part_usage_info *want = >infos[i];
 
 		if (want->cur_part_id != NO_PART)



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-12-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Dec  9 19:31:18 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: disklabel.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #537):
usr.sbin/sysinst/disklabel.c: revision 1.16
usr.sbin/sysinst/disklabel.c: revision 1.17
Sanitize disk type and packname a bit more - when using existing disklabel
partitions we might run into trouble later when filing this label (unescaped)
in disktab format otherwise.
Relax restrictions on packnames, as disklabel(8) does not do full decoding
for the tag field.
Fix quoting of command args.


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.5 -r1.10.2.6 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.5 src/usr.sbin/sysinst/disklabel.c:1.10.2.6
--- src/usr.sbin/sysinst/disklabel.c:1.10.2.5	Sun Nov 17 13:45:26 2019
+++ src/usr.sbin/sysinst/disklabel.c	Mon Dec  9 19:31:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.10.2.5 2019/11/17 13:45:26 msaitoh Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.10.2.6 2019/12/09 19:31:18 bouyer Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -262,13 +262,32 @@ disklabel_parts_read(const char *disk, d
 	return >dp;
 }
 
+/*
+ * Escape a string for usage as a tag name in a capfile(5),
+ * we really know there is enough space in the destination buffer...
+ */
+static void
+escape_capfile(char *dest, const char *src, size_t len)
+{
+	while (*src && len > 0) {
+		if (*src == ':')
+			*dest++ = ' ';
+		else
+			*dest++ = *src;
+		src++;
+		len--;
+	}
+	*dest = 0;
+}
+
 static bool
 disklabel_write_to_disk(struct disk_partitions *arg)
 {
 	struct disklabel_disk_partitions *parts =
 	(struct disklabel_disk_partitions*)arg;
 	FILE *f;
-	char fname[PATH_MAX], packname[sizeof(parts->l.d_packname)+1];
+	char fname[PATH_MAX], packname[sizeof(parts->l.d_packname)+1],
+	disktype[sizeof(parts->l.d_typename)+1];
 	int i, rv = 0;
 	const char *disk = parts->dp.disk, *s;
 	const struct partition *lp;
@@ -281,13 +300,10 @@ disklabel_write_to_disk(struct disk_part
 	assert(parts->l.d_ncylinders != 0);
 	assert(parts->l.d_secpercyl != 0);
 
-	sprintf(fname, "/tmp/disklabel.%u", getpid());
-	f = fopen(fname, "w");
-	if (f == NULL)
-		return false;
-
 	/* make sure we have a 0 terminated packname */
 	strlcpy(packname, parts->l.d_packname, sizeof packname);
+	if (packname[0] == 0)
+		strcpy(packname, "fictious");
 
 	/* fill typename with disk name prefix, if not already set */
 	if (strlen(parts->l.d_typename) == 0) {
@@ -298,18 +314,24 @@ disklabel_write_to_disk(struct disk_part
 			*d = *s;
 		}
 	}
-	parts->l.d_typename[sizeof(parts->l.d_typename)-1] = 0;
 
 	/* we need a valid disk type name, so enforce an arbitrary if
 	 * above did not yield a usable one */
 	if (strlen(parts->l.d_typename) == 0)
 		strncpy(parts->l.d_typename, "SCSI",
 		sizeof(parts->l.d_typename));
+	escape_capfile(disktype, parts->l.d_typename,
+	sizeof(parts->l.d_typename));
+
+	sprintf(fname, "/tmp/disklabel.%u", getpid());
+	f = fopen(fname, "w");
+	if (f == NULL)
+		return false;
 
 	lp = parts->l.d_partitions;
 	scripting_fprintf(NULL, "cat <%s\n", fname);
 	scripting_fprintf(f, "%s|NetBSD installation generated:\\\n",
-	parts->l.d_typename);
+	disktype);
 	scripting_fprintf(f, "\t:nc#%d:nt#%d:ns#%d:\\\n",
 	parts->l.d_ncylinders, parts->l.d_ntracks, parts->l.d_nsectors);
 	scripting_fprintf(f, "\t:sc#%d:su#%" PRIu32 ":\\\n",
@@ -351,8 +373,8 @@ disklabel_write_to_disk(struct disk_part
 	 */
 #ifdef DISKLABEL_CMD
 	/* disklabel the disk */
-	rv = run_program(RUN_DISPLAY, "%s -f %s %s %s %s",
-	DISKLABEL_CMD, fname, disk, parts->l.d_typename, packname);
+	rv = run_program(RUN_DISPLAY, "%s -f %s %s '%s' '%s'",
+	DISKLABEL_CMD, fname, disk, disktype, packname);
 #endif
 
 	unlink(fname);