| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: partman.c,v 1.51 2021/01/31 22:45:46 rillig Exp $ */ | | 1 | /* $NetBSD: partman.c,v 1.52 2021/07/17 11:32:50 martin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright 2012 Eugene Lozovoy | | 4 | * Copyright 2012 Eugene Lozovoy |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -2837,33 +2837,33 @@ pm_menufmt(menudesc *m, int opt, void *a | | | @@ -2837,33 +2837,33 @@ pm_menufmt(menudesc *m, int opt, void *a |
2837 | switch (((struct part_entry *)arg)[opt].type) { | | 2837 | switch (((struct part_entry *)arg)[opt].type) { |
2838 | case PM_DISK: | | 2838 | case PM_DISK: |
2839 | if (pm_cur->blocked) | | 2839 | if (pm_cur->blocked) |
2840 | dev_status = msg_string(MSG_pmblocked); | | 2840 | dev_status = msg_string(MSG_pmblocked); |
2841 | else if (! pm_cur->unsaved) | | 2841 | else if (! pm_cur->unsaved) |
2842 | dev_status = msg_string(MSG_pmunchanged); | | 2842 | dev_status = msg_string(MSG_pmunchanged); |
2843 | else | | 2843 | else |
2844 | dev_status = msg_string(MSG_pmused); | | 2844 | dev_status = msg_string(MSG_pmused); |
2845 | wprintw(m->mw, "%-43.42s %25.24s", | | 2845 | wprintw(m->mw, "%-43.42s %25.24s", |
2846 | pm_cur->diskdev_descr, | | 2846 | pm_cur->diskdev_descr, |
2847 | dev_status); | | 2847 | dev_status); |
2848 | break; | | 2848 | break; |
2849 | case PM_PART: | | 2849 | case PM_PART: |
2850 | if (parts->pscheme->get_part_device != NULL) | | 2850 | if (parts->pscheme->get_part_device == NULL || |
2851 | parts->pscheme->get_part_device( | | 2851 | !parts->pscheme->get_part_device( |
2852 | parts, part_num, | | 2852 | parts, part_num, |
2853 | dev, sizeof dev, NULL, plain_name, false, | | 2853 | dev, sizeof dev, NULL, plain_name, false, |
2854 | true); | | 2854 | true)) |
2855 | else | | 2855 | strcpy(dev, "-"); |
2856 | strcpy(dev, "-"); | | 2856 | |
2857 | parts->pscheme->get_part_info(parts, | | 2857 | parts->pscheme->get_part_info(parts, |
2858 | part_num, &info); | | 2858 | part_num, &info); |
2859 | if (pm_cur->mounted != NULL && | | 2859 | if (pm_cur->mounted != NULL && |
2860 | pm_cur->mounted[part_num] != NULL && | | 2860 | pm_cur->mounted[part_num] != NULL && |
2861 | pm_cur->mounted[part_num][0] != 0) | | 2861 | pm_cur->mounted[part_num][0] != 0) |
2862 | mount_point = msg_string(MSG_pmmounted); | | 2862 | mount_point = msg_string(MSG_pmmounted); |
2863 | else | | 2863 | else |
2864 | mount_point = msg_string(MSG_pmunused); | | 2864 | mount_point = msg_string(MSG_pmunused); |
2865 | fstype = getfslabelname(info.fs_type, | | 2865 | fstype = getfslabelname(info.fs_type, |
2866 | info.fs_sub_type); | | 2866 | info.fs_sub_type); |
2867 | if (info.last_mounted != NULL) { | | 2867 | if (info.last_mounted != NULL) { |
2868 | snprintf(buf, STRSIZE, "%s (%s) %s", | | 2868 | snprintf(buf, STRSIZE, "%s (%s) %s", |
2869 | info.last_mounted, fstype, | | 2869 | info.last_mounted, fstype, |