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, &args); - 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, &args); + 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;