From 7886d74d770b98e88b869926f3f200d60acbe658 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Sep 2020 18:13:25 +0000 Subject: [PATCH] PR 55377: mark boot partitions in the partition size display, as suggested by Izumi Tsutsui (minor modifications + all bugs by me) --- usr.sbin/sysinst/bsddisklabel.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.sbin/sysinst/bsddisklabel.c b/usr.sbin/sysinst/bsddisklabel.c index c563d19d42af..d8b0bef434bf 100644 --- a/usr.sbin/sysinst/bsddisklabel.c +++ b/usr.sbin/sysinst/bsddisklabel.c @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.43 2020/09/22 16:18:54 martin Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.44 2020/09/28 18:13:25 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -260,7 +260,13 @@ draw_size_menu_line(menudesc *m, int opt, void *arg) pset->infos[opt].fs_version)); mount = swap; } else if (pset->infos[opt].mount[0]) { - mount = pset->infos[opt].mount; + if (pset->infos[opt].instflags & PUIINST_BOOT) { + snprintf(swap, sizeof swap, "%s <%s>", + pset->infos[opt].mount, msg_string(MSG_ptn_boot)); + mount = swap; + } else { + mount = pset->infos[opt].mount; + } #ifndef NO_CLONES } else if (pset->infos[opt].flags & PUIFLG_CLONE_PARTS) { snprintf(swap, sizeof swap, "%zu %s", @@ -278,6 +284,11 @@ draw_size_menu_line(menudesc *m, int opt, void *arg) if (mount == NULL) mount = getfslabelname(pset->infos[opt].fs_type, pset->infos[opt].fs_version); + if (pset->infos[opt].instflags & PUIINST_BOOT) { + snprintf(swap, sizeof swap, "%s <%s>", + mount, msg_string(MSG_ptn_boot)); + mount = swap; + } mount = str_arg_subst(msg_string(MSG_size_ptn_not_mounted), 1, &mount); free_mount = true;