Module Name: src Committed By: martin Date: Wed Dec 11 19:23:38 UTC 2019
Modified Files: src/usr.sbin/sysinst: disks.c label.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl src/usr.sbin/sysinst/arch/cobalt: md.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/sysinst/disks.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/msg.mi.de cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/cobalt/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/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.57 src/usr.sbin/sysinst/disks.c:1.58 --- src/usr.sbin/sysinst/disks.c:1.57 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/disks.c Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.57 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: disks.c,v 1.58 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -113,6 +113,8 @@ getfslabelname(uint f, uint f_version) else if (f == FS_BSDFFS && f_version > 0) return f_version == 2 ? msg_string(MSG_fs_type_ffsv2) : msg_string(MSG_fs_type_ffs); + else if (f == FS_EX2FS && f_version == 1) + return msg_string(MSG_fs_type_ext2old); else if (f >= __arraycount(fstypenames) || fstypenames[f] == NULL) return "invalid"; return fstypenames[f]; @@ -1177,7 +1179,10 @@ make_filesystems(struct install_partitio fsname = "v7fs"; break; case FS_EX2FS: - asprintf(&newfs, "/sbin/newfs_ext2fs"); + asprintf(&newfs, + ptn->fs_version == 1 ? + "/sbin/newfs_ext2fs -O 0" : + "/sbin/newfs_ext2fs"); mnt_opts = "-text2fs"; fsname = "ext2fs"; break; Index: src/usr.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.14 src/usr.sbin/sysinst/label.c:1.15 --- src/usr.sbin/sysinst/label.c:1.14 Wed Nov 13 18:57:26 2019 +++ src/usr.sbin/sysinst/label.c Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.14 2019/11/13 18:57:26 martin Exp $ */ +/* $NetBSD: label.c,v 1.15 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.14 2019/11/13 18:57:26 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.15 2019/12/11 19:23:37 martin Exp $"); #endif #include <sys/types.h> @@ -461,6 +461,9 @@ init_fs_type_ext(menudesc *menu, void *a else menu->cursel = 1; return; + } else if (t == FS_EX2FS && edit->info.fs_sub_type == 1) { + menu->cursel = FSMAXTYPES; + return; } /* skip the two FFS entries, and do not add FFS later again */ for (ndx = 2, i = 0; i < FSMAXTYPES && ndx < max; i++) { @@ -488,13 +491,11 @@ set_fstype_ext(menudesc *menu, void *arg if (menu->cursel == 0 || menu->cursel == 1) { edit->info.fs_type = FS_BSDFFS; edit->info.fs_sub_type = menu->cursel == 0 ? 2 : 1; - edit->info.nat_type = edit->pset->parts->pscheme-> - get_fs_part_type(edit->info.fs_type, - edit->info.fs_sub_type); - edit->wanted->type = edit->info.nat_type->generic_ptype; - edit->wanted->fs_type = edit->info.fs_type; - edit->wanted->fs_version = edit->info.fs_sub_type; - return 1; + goto found_type; + } else if (menu->cursel == FSMAXTYPES) { + edit->info.fs_type = FS_EX2FS; + edit->info.fs_sub_type = 1; + goto found_type; } for (ndx = 2, i = 0; i < FSMAXTYPES && ndx < max; i++) { @@ -508,19 +509,22 @@ set_fstype_ext(menudesc *menu, void *arg if (ndx == (size_t)menu->cursel) { edit->info.fs_type = i; edit->info.fs_sub_type = 0; - edit->info.nat_type = edit->pset->parts->pscheme-> - get_fs_part_type(i, 0); - if (edit->info.nat_type == NULL) - edit->info.nat_type = edit->pset->parts-> - pscheme->get_generic_part_type(PT_root); - edit->wanted->type = edit->info.nat_type->generic_ptype; - edit->wanted->fs_type = edit->info.fs_type; - edit->wanted->fs_version = edit->info.fs_sub_type; - break; + goto found_type; } ndx++; } return 1; + +found_type: + edit->info.nat_type = edit->pset->parts->pscheme-> + get_fs_part_type(edit->info.fs_type, edit->info.fs_sub_type); + if (edit->info.nat_type == NULL) + edit->info.nat_type = edit->pset->parts->pscheme-> + get_generic_part_type(PT_root); + edit->wanted->type = edit->info.nat_type->generic_ptype; + edit->wanted->fs_type = edit->info.fs_type; + edit->wanted->fs_version = edit->info.fs_sub_type; + return 1; } /* @@ -534,7 +538,7 @@ edit_fs_type_ext(menudesc *menu, void *a int m; size_t i, ndx, cnt; - cnt = __arraycount(fstypenames)-1; + cnt = __arraycount(fstypenames); opts = calloc(cnt, sizeof(*opts)); if (opts == NULL) return 1; @@ -557,6 +561,9 @@ edit_fs_type_ext(menudesc *menu, void *a opts[ndx].opt_action = set_fstype_ext; ndx++; } + opts[ndx].opt_name = msg_string(MSG_fs_type_ext2old); + opts[ndx].opt_action = set_fstype_ext; + ndx++; assert(ndx == cnt); m = new_menu(MSG_Select_the_type, opts, ndx, 30, 6, 10, 0, MC_SUBMENU | MC_SCROLL, @@ -644,6 +651,10 @@ edit_fs_type(menudesc *menu, void *arg) /* * Shortcut to full menu if we have an exotic value */ + if (edit->info.fs_type == FS_EX2FS && edit->info.fs_sub_type == 1) { + edit_fs_type_ext(menu, arg); + return 0; + } for (i = 0; i < __arraycount(edit_fs_common_types); i++) if (edit->info.fs_type == edit_fs_common_types[i]) break; Index: src/usr.sbin/sysinst/msg.mi.de diff -u src/usr.sbin/sysinst/msg.mi.de:1.18 src/usr.sbin/sysinst/msg.mi.de:1.19 --- src/usr.sbin/sysinst/msg.mi.de:1.18 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/msg.mi.de Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.de,v 1.18 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: msg.mi.de,v 1.19 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1346,6 +1346,7 @@ message free_space_line {Speicherplatz b message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} +message fs_type_ext2old {Linux Ext2 (old)} message other_fs_type {Anderer Typ} message editpack {Namen der Festplatte festlegen} Index: src/usr.sbin/sysinst/msg.mi.en diff -u src/usr.sbin/sysinst/msg.mi.en:1.25 src/usr.sbin/sysinst/msg.mi.en:1.26 --- src/usr.sbin/sysinst/msg.mi.en:1.25 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/msg.mi.en Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.25 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: msg.mi.en,v 1.26 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1276,6 +1276,7 @@ message free_space_line {Space at $0..$1 message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} +message fs_type_ext2old {Linux Ext2 (old)} message other_fs_type {Other type} message editpack {Edit name of the disk} Index: src/usr.sbin/sysinst/msg.mi.es diff -u src/usr.sbin/sysinst/msg.mi.es:1.19 src/usr.sbin/sysinst/msg.mi.es:1.20 --- src/usr.sbin/sysinst/msg.mi.es:1.19 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/msg.mi.es Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.es,v 1.19 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: msg.mi.es,v 1.20 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1326,6 +1326,7 @@ message free_space_line {Espacio en $0.. message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} +message fs_type_ext2old {Linux Ext2 (old)} message other_fs_type {Other type} message editpack {Edit name of the disk} Index: src/usr.sbin/sysinst/msg.mi.fr diff -u src/usr.sbin/sysinst/msg.mi.fr:1.23 src/usr.sbin/sysinst/msg.mi.fr:1.24 --- src/usr.sbin/sysinst/msg.mi.fr:1.23 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/msg.mi.fr Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.fr,v 1.23 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: msg.mi.fr,v 1.24 2019/12/11 19:23:37 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1378,6 +1378,7 @@ message free_space_line {Espace à $0..$1 message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} +message fs_type_ext2old {Linux Ext2 (old)} message other_fs_type {Other type} message editpack {Changer le nom du disque} Index: src/usr.sbin/sysinst/msg.mi.pl diff -u src/usr.sbin/sysinst/msg.mi.pl:1.26 src/usr.sbin/sysinst/msg.mi.pl:1.27 --- src/usr.sbin/sysinst/msg.mi.pl:1.26 Sat Nov 16 20:26:59 2019 +++ src/usr.sbin/sysinst/msg.mi.pl Wed Dec 11 19:23:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.pl,v 1.26 2019/11/16 20:26:59 martin Exp $ */ +/* $NetBSD: msg.mi.pl,v 1.27 2019/12/11 19:23:37 martin Exp $ */ /* Based on english version: */ /* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */ @@ -1275,6 +1275,7 @@ message free_space_line {Miejsce od $0.. message fs_type_ffsv2 {FFSv2} message fs_type_ffs {FFS} +message fs_type_ext2old {Linux Ext2 (old)} message other_fs_type {Inny typ} message editpack {Edytuj nazwe dysku} Index: src/usr.sbin/sysinst/arch/cobalt/md.h diff -u src/usr.sbin/sysinst/arch/cobalt/md.h:1.4 src/usr.sbin/sysinst/arch/cobalt/md.h:1.5 --- src/usr.sbin/sysinst/arch/cobalt/md.h:1.4 Wed Oct 2 11:16:01 2019 +++ src/usr.sbin/sysinst/arch/cobalt/md.h Wed Dec 11 19:23:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.4 2019/10/02 11:16:01 maya Exp $ */ +/* $NetBSD: md.h,v 1.5 2019/12/11 19:23:38 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -48,6 +48,7 @@ #define PART_BOOT (5 * 1024 * 1024) /* 5MB boot partition */ #define PART_BOOT_MIN (1 * 1024 * 1024) /* 1MB minimum */ #define PART_BOOT_TYPE FS_EX2FS +#define PART_BOOT_SUBT 1 /* use "old" ext2 */ #define PART_BOOT_MOUNT "/stand" /* default partition size */