Use _fmt_ msg_ methods when formats are needed.
This commit is contained in:
parent
80b70339c3
commit
24ecf24e51
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:18 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -152,7 +152,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
char *bootxx;
|
||||
int error;
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", "/boot");
|
||||
bootxx = bootxx_name(install);
|
||||
if (bootxx != NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:18 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -109,7 +109,7 @@ int
|
|||
md_post_newfs(struct install_partition_desc *install)
|
||||
{
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
return run_program(RUN_DISPLAY,
|
||||
"/usr/mdec/installboot -v /usr/mdec/xxboot /dev/r%sa", pm->diskdev);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/13 09:36:54 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -169,7 +169,8 @@ int
|
|||
md_post_newfs(struct install_partition_desc *install)
|
||||
{
|
||||
if (!nobootfs) {
|
||||
msg_display(msg_string(MSG_copybootloader), pm->diskdev);
|
||||
msg_fmt_display(msg_string(MSG_copybootloader), "%s",
|
||||
pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", PART_BOOT_MOUNT);
|
||||
}
|
||||
|
||||
|
@ -206,7 +207,7 @@ md_pre_update(struct install_partition_desc *install)
|
|||
if (install->infos[i].size/512 >= PART_BOOT_MIN)
|
||||
break;
|
||||
msg_display(MSG_boottoosmall);
|
||||
msg_display_add(MSG_nobootpart, 0);
|
||||
msg_fmt_display_add(MSG_nobootpart, "%d", 0);
|
||||
if (!ask_yesno(NULL))
|
||||
return false;
|
||||
nobootfs = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:18 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -68,7 +68,7 @@ md_get_info(struct install_partition_desc *install)
|
|||
bool
|
||||
md_make_bsd_partitions(struct install_partition_desc *install)
|
||||
{
|
||||
msg_display(MSG_infoahdilabel, pm->diskdev);
|
||||
msg_fmt_display(MSG_infoahdilabel, "%s", pm->diskdev);
|
||||
if (ask_noyes(NULL)) {
|
||||
run_program(RUN_DISPLAY, "ahdilabel /dev/r%sc", pm->diskdev);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
free(cpu_model);
|
||||
|
||||
/* copy tertiary boot and install boot blocks */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
snprintf(bootpath, sizeof(bootpath), "/usr/mdec/%s/boot.atari",
|
||||
milan ? "milan" : "std");
|
||||
rv = cp_to_target(bootpath, "/");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/13 09:36:54 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -177,7 +177,8 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
unsigned int i;
|
||||
|
||||
if (!nobootfs) {
|
||||
msg_display(msg_string(MSG_copybootloader), pm->diskdev);
|
||||
msg_fmt_display(msg_string(MSG_copybootloader), "%s",
|
||||
pm->diskdev);
|
||||
|
||||
snprintf(bootdir, sizeof(bootdir), "%s/boot",
|
||||
target_expand(PART_BOOT_MOUNT));
|
||||
|
@ -221,7 +222,7 @@ md_pre_update(struct install_partition_desc *install)
|
|||
if (install->infos[i].size/512 >= PART_BOOT_MIN)
|
||||
break;
|
||||
msg_display(MSG_boottoosmall);
|
||||
msg_display_add(MSG_nobootpart, 0);
|
||||
msg_fmt_display_add(MSG_nobootpart, "%d", 0);
|
||||
if (!ask_yesno(NULL))
|
||||
return false;
|
||||
nobootfs = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.5 2019/06/12 06:20:19 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -168,7 +168,7 @@ md_post_extract(struct install_partition_desc *install)
|
|||
|
||||
strlcpy(ldr_path, target_expand("/boot.emips"), sizeof ldr_path);
|
||||
|
||||
msg_display(MSG_dobootblks, "");
|
||||
msg_display(MSG_dobootblks);
|
||||
|
||||
if (ask_noyes(NULL)) {
|
||||
if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/12 06:20:20 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -140,7 +140,7 @@ md_check_partitions(struct install_partition_desc *install)
|
|||
snprintf(desc, sizeof desc,
|
||||
"%zu (%s)", i,
|
||||
install->infos[i].mount);
|
||||
msg_display(MSG_ordering, desc);
|
||||
msg_fmt_display(MSG_ordering, "%s", desc);
|
||||
if (ask_yesno(NULL))
|
||||
return false;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ int
|
|||
md_post_newfs(struct install_partition_desc *install)
|
||||
{
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
|
||||
"/usr/sbin/installboot /dev/r%sc /usr/mdec/uboot.lif", pm->diskdev))
|
||||
process_menu(MENU_ok,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.5 2019/06/12 06:20:20 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -184,7 +184,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
return error;
|
||||
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
if (run_program(RUN_DISPLAY,
|
||||
"/usr/sbin/installboot -v /dev/r%sc /usr/mdec/xxboot",
|
||||
pm->diskdev))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.17 2019/06/19 17:32:31 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.18 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -244,7 +244,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
}
|
||||
|
||||
process_menu(MENU_getboottype, &boottype);
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
if (boottype.bp_consdev == ~0u)
|
||||
/* Use existing bootblocks */
|
||||
return 0;
|
||||
|
@ -490,7 +490,7 @@ md_check_mbr(struct disk_partitions *parts, mbr_info_t *mbri, bool quiet)
|
|||
return 2;
|
||||
|
||||
/* This shouldn't happen since the files are in the floppy fs... */
|
||||
msg_display("Can't find %s", bootcode);
|
||||
msg_fmt_display("Can't find %s", "%s", bootcode);
|
||||
return ask_reedit(parts);
|
||||
}
|
||||
|
||||
|
@ -533,11 +533,14 @@ get_bios_info(const char *dev, struct disk_partitions *parts, int *bcyl,
|
|||
if (nip == NULL || nip->ni_nmatches == 0) {
|
||||
nogeom:
|
||||
if (nip != NULL)
|
||||
msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead,
|
||||
pm->dlsec);
|
||||
msg_fmt_display(MSG_nobiosgeom, "%d%d%d",
|
||||
pm->dlcyl, pm->dlhead, pm->dlsec);
|
||||
if (guess_biosgeom_from_parts(parts, &cyl, &head, &sec) >= 0
|
||||
&& nip != NULL)
|
||||
msg_display_add(MSG_biosguess, cyl, head, sec);
|
||||
{
|
||||
msg_fmt_display_add(MSG_biosguess, "%d%d%d",
|
||||
cyl, head, sec);
|
||||
}
|
||||
biosdisk = NULL;
|
||||
} else {
|
||||
guess_biosgeom_from_parts(parts, &cyl, &head, &sec);
|
||||
|
@ -545,8 +548,8 @@ nogeom:
|
|||
bip = &disklist->dl_biosdisks[nip->ni_biosmatches[0]];
|
||||
msg_display(MSG_onebiosmatch);
|
||||
msg_table_add(MSG_onebiosmatch_header);
|
||||
msg_table_add(MSG_onebiosmatch_row, bip->bi_dev,
|
||||
bip->bi_cyl, bip->bi_head, bip->bi_sec,
|
||||
msg_fmt_table_add(MSG_onebiosmatch_row, "%d%d%d%d%u%u",
|
||||
bip->bi_dev, bip->bi_cyl, bip->bi_head, bip->bi_sec,
|
||||
(unsigned)bip->bi_lbasecs,
|
||||
(unsigned)(bip->bi_lbasecs / (1000000000 / 512)));
|
||||
msg_display_add(MSG_biosgeom_advise);
|
||||
|
@ -558,7 +561,8 @@ nogeom:
|
|||
for (i = 0; i < nip->ni_nmatches; i++) {
|
||||
bip = &disklist->dl_biosdisks[
|
||||
nip->ni_biosmatches[i]];
|
||||
msg_table_add(MSG_biosmultmatch_row, i,
|
||||
msg_fmt_table_add(MSG_biosmultmatch_row,
|
||||
"%d%d%d%d%d%u%u", i,
|
||||
bip->bi_dev, bip->bi_cyl, bip->bi_head,
|
||||
bip->bi_sec, (unsigned)bip->bi_lbasecs,
|
||||
(unsigned)bip->bi_lbasecs/(1000000000/512));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.md,v 1.1 2014/07/26 19:30:45 dholland Exp $ */
|
||||
/* $NetBSD: menus.md,v 1.2 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -44,7 +44,7 @@ menu getboottype, title MSG_Bootblocks_selection, y=10, exit, no clear;
|
|||
case 1: case 2: case 3: case 4:
|
||||
if (menu->cursel == 0)
|
||||
menu->cursel = ((struct x86_boot_params *)arg)->bp_consdev;
|
||||
msg_display_add(MSG_console_com,
|
||||
msg_fmt_display_add(MSG_console_com, "%u%u",
|
||||
((struct x86_boot_params *)arg)->bp_consdev - 1,
|
||||
((struct x86_boot_params *)arg)->bp_conspeed);
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.7 2019/06/17 14:19:44 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.8 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997,2002 Piermont Information Systems Inc.
|
||||
|
@ -151,7 +151,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
char *bootxx;
|
||||
int error;
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", "/boot");
|
||||
bootxx = bootxx_name(install);
|
||||
if (bootxx != NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.5 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -164,7 +164,7 @@ copy_bootloader(const char *diskdev)
|
|||
{
|
||||
const char *mntdir = "/mnt2";
|
||||
|
||||
msg_display(MSG_copybootloader, diskdev);
|
||||
msg_fmt_display(MSG_copybootloader, "%s", diskdev);
|
||||
if (!run_program(RUN_SILENT | RUN_ERROR_OK,
|
||||
"mount %s %s", diskdev, mntdir)) {
|
||||
mnt2_mounted = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -203,7 +203,8 @@ md_get_info(struct install_partition_desc *install)
|
|||
#endif /* 0 - broken */
|
||||
pm->dlsize = disklabel.d_secperunit;
|
||||
#if 0
|
||||
msg_display(MSG_dldebug, blk_size, pm->dlcyl, pm->dlhead, pm->dlsec, pm->dlsize);
|
||||
msg_fmt_display(MSG_dldebug, "%d%d%d%d%d",
|
||||
blk_size, pm->dlcyl, pm->dlhead, pm->dlsec, pm->dlsize);
|
||||
process_menu(MENU_ok, NULL);
|
||||
#endif
|
||||
map.size = 0;
|
||||
|
@ -517,16 +518,17 @@ md_post_disklabel(struct install_partition_desc *install,
|
|||
if (no_match) {
|
||||
msg_clear();
|
||||
msg_display(MSG_label_error);
|
||||
msg_table_add(MSG_dump_line,
|
||||
msg_fmt_table_add(MSG_dump_line, "%s",
|
||||
" in-core: offset size type on-disk: offset size type");
|
||||
for (i=0;i<MAXPARTITIONS;i++) {
|
||||
sprintf(buf, " %c:%13.8x%10.8x%5s%16.8x%10.8x%5s", i+'a',
|
||||
snprintf(buf, sizeof(buf),
|
||||
" %c:%13.8x%10.8x%5s%16.8x%10.8x%5s", i+'a',
|
||||
pm->bsdlabel[i].pi_offset, pm->bsdlabel[i].pi_size,
|
||||
fst[pm->bsdlabel[i].pi_fstype],
|
||||
updated_label.d_partitions[i].p_offset,
|
||||
updated_label.d_partitions[i].p_size,
|
||||
fst[updated_label.d_partitions[i].p_fstype]);
|
||||
msg_table_add(MSG_dump_line, buf);
|
||||
msg_fmt_table_add(MSG_dump_line, "%s", buf);
|
||||
}
|
||||
process_menu(MENU_ok2, NULL);
|
||||
}
|
||||
|
@ -1067,7 +1069,8 @@ disp_selected_part(sel)
|
|||
getUse(&map.blk[j], sizeof(use), use);
|
||||
getName(&map.blk[j], sizeof(name), name);
|
||||
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
|
||||
msg_table_add(MSG_part_row, pm->diskdev,
|
||||
msg_fmt_table_add(MSG_part_row, "%s%c%d%d%s%s%s",
|
||||
pm->diskdev,
|
||||
bzb->flags.part, map.blk[j].pmPyPartStart,
|
||||
map.blk[j].pmPartBlkCnt, fstyp, use, name);
|
||||
if (i == sel) msg_standend();
|
||||
|
@ -1127,13 +1130,13 @@ report_errors()
|
|||
j = map.mblk[i];
|
||||
if (map.blk[j].pmPyPartStart > pm->dlsize) {
|
||||
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
|
||||
msg_display_add(MSG_disksetup_part_beginning,
|
||||
msg_fmt_display_add(MSG_disksetup_part_beginning, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
errs++;
|
||||
}
|
||||
if ((map.blk[j].pmPyPartStart + map.blk[j].pmPartBlkCnt) > pm->dlsize) {
|
||||
bzb = (EBZB *)&map.blk[j].pmBootArgs[0];
|
||||
msg_display_add(MSG_disksetup_part_size,
|
||||
msg_fmt_display_add(MSG_disksetup_part_size, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
errs++;
|
||||
}
|
||||
|
@ -1149,7 +1152,7 @@ edit_diskmap(void)
|
|||
int i;
|
||||
|
||||
/* Ask full/part */
|
||||
msg_display (MSG_mac68k_fullpart, pm->diskdev);
|
||||
msg_fmt_display (MSG_mac68k_fullpart, "%s", pm->diskdev);
|
||||
process_menu (MENU_fullpart, NULL);
|
||||
|
||||
map.selected = 0;
|
||||
|
@ -1190,8 +1193,8 @@ md_debug_dump(title)
|
|||
|
||||
msg_clear();
|
||||
sprintf(buf, "Apple Disk Partition Map: %s", title);
|
||||
msg_table_add(MSG_dump_line, buf);
|
||||
msg_table_add(MSG_dump_line,
|
||||
msg_fmt_table_add(MSG_dump_line, "%s", buf);
|
||||
msg_fmt_table_add(MSG_dump_line, "%s",
|
||||
"slot base fstype use name");
|
||||
for (i=0;i<map.in_use_cnt;i++) {
|
||||
j = whichType(&map.blk[i]);
|
||||
|
@ -1204,7 +1207,7 @@ md_debug_dump(title)
|
|||
if (j == 0) strcpy (name, "reserved for Apple");
|
||||
sprintf(buf, " %02d:%c %08x %8s %10s %s", i+1, type,
|
||||
map.blk[i].pmPyPartStart, fstyp, use, name);
|
||||
msg_table_add(MSG_dump_line, buf);
|
||||
msg_fmt_table_add(MSG_dump_line, "%s", buf);
|
||||
}
|
||||
process_menu(MENU_okabort, &rv);
|
||||
msg_clear();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.md.de,v 1.5 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: menus.md.de,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -39,7 +39,7 @@ menu fullpart, title "Bitte w
|
|||
option "Die ganze Festplatte für NetBSD verwenden", exit, action {usefull = 1;};
|
||||
|
||||
menu nodiskmap, title "Bitte wählen Sie", y=16;
|
||||
display action { msg_display (MSG_nodiskmap, pm->diskdev); };
|
||||
display action { msg_fmt_display (MSG_nodiskmap, "%s", pm->diskdev); };
|
||||
option "Installation abbrechen", exit, action {
|
||||
endwin(); exit(1);
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ menu editparttable, title "W
|
|||
EBZB *bzb;
|
||||
|
||||
j = map.mblk[map.selected];
|
||||
msg_display(MSG_split_part, map.blk[j].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_split_part, "%s", map.blk[j].pmPartBlkCnt);
|
||||
msg_prompt_add (MSG_scratch_size, NULL, buf, sizeof(buf));
|
||||
size = atoi(buf);
|
||||
if (size > 0 && size < map.blk[j].pmPartBlkCnt) {
|
||||
|
@ -129,19 +129,19 @@ menu editparttable, title "W
|
|||
option "Partition korrigieren", action {
|
||||
int i = map.mblk[map.selected];
|
||||
EBZB *bzb = (EBZB *)&map.blk[i].pmBootArgs[0];
|
||||
msg_display(MSG_partdebug, pm->diskdev, bzb->flags.part,
|
||||
map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_partdebug, "%s%c%d%d",
|
||||
pm->diskdev, bzb->flags.part, map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
if ((map.blk[i].pmPyPartStart +
|
||||
map.blk[i].pmPartBlkCnt) > pm->dlsize) {
|
||||
msg_display_add(MSG_parttable_fix_fixing,
|
||||
pm->diskdev, bzb->flags.part);
|
||||
msg_fmt_display_add(MSG_parttable_fix_fixing,
|
||||
"%s%c", pm->diskdev, bzb->flags.part);
|
||||
map.blk[i].pmPartBlkCnt =
|
||||
pm->dlsize - map.blk[i].pmPyPartStart;
|
||||
map.blk[i].pmDataCnt =
|
||||
map.blk[i].pmPartBlkCnt;
|
||||
} else {
|
||||
msg_display_add(MSG_parttable_fix_fine,
|
||||
msg_fmt_display_add(MSG_parttable_fix_fine, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
}
|
||||
process_menu(MENU_ok, NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.md.en,v 1.5 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: menus.md.en,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -39,7 +39,7 @@ menu fullpart, title "Select your choice";
|
|||
option "Use the entire disk", exit, action {usefull = 1;};
|
||||
|
||||
menu nodiskmap, title "Choose an option", y=16;
|
||||
display action { msg_display (MSG_nodiskmap, pm->diskdev); };
|
||||
display action { msg_fmt_display (MSG_nodiskmap, "%s", pm->diskdev); };
|
||||
option "Abort install", exit, action {
|
||||
endwin(); exit(1);
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ menu editparttable, title "Choose your partition", exit, y=14;
|
|||
EBZB *bzb;
|
||||
|
||||
j = map.mblk[map.selected];
|
||||
msg_display(MSG_split_part, map.blk[j].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_split_part, "%d", map.blk[j].pmPartBlkCnt);
|
||||
msg_prompt_add (MSG_scratch_size, NULL, buf, sizeof(buf));
|
||||
size = atoi(buf);
|
||||
if (size > 0 && size < (int)map.blk[j].pmPartBlkCnt) {
|
||||
|
@ -129,19 +129,20 @@ menu editparttable, title "Choose your partition", exit, y=14;
|
|||
option "Fix selected partition", action {
|
||||
int i = map.mblk[map.selected];
|
||||
EBZB *bzb = (EBZB *)&map.blk[i].pmBootArgs[0];
|
||||
msg_display(MSG_partdebug, pm->diskdev, bzb->flags.part,
|
||||
map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_partdebug, "%s%c%d%d",
|
||||
pm->diskdev, bzb->flags.part, map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
if ((map.blk[i].pmPyPartStart +
|
||||
map.blk[i].pmPartBlkCnt) > pm->dlsize) {
|
||||
msg_display_add(MSG_parttable_fix_fixing,
|
||||
pm->diskdev, bzb->flags.part);
|
||||
msg_fmt_display_add(MSG_parttable_fix_fixing,
|
||||
"%s%c%d%d",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
map.blk[i].pmPartBlkCnt =
|
||||
pm->dlsize - map.blk[i].pmPyPartStart;
|
||||
map.blk[i].pmDataCnt =
|
||||
map.blk[i].pmPartBlkCnt;
|
||||
} else {
|
||||
msg_display_add(MSG_parttable_fix_fine,
|
||||
msg_fmt_display_add(MSG_parttable_fix_fine, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
}
|
||||
process_menu(MENU_ok, NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.md.es,v 1.5 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: menus.md.es,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -39,7 +39,7 @@ menu fullpart, title "Seleccione su opcion";
|
|||
option "Usar el disco entero", exit, action {usefull = 1;};
|
||||
|
||||
menu nodiskmap, title "Escoja una opcion", y=16;
|
||||
display action { msg_display (MSG_nodiskmap, pm->diskdev); };
|
||||
display action { msg_fmt_display (MSG_nodiskmap, "%s", pm->diskdev); };
|
||||
option "Abortar instalacion", exit, action {
|
||||
endwin(); exit(1);
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ menu editparttable, title "Escoja su particion", exit, y=14;
|
|||
EBZB *bzb;
|
||||
|
||||
j = map.mblk[map.selected];
|
||||
msg_display(MSG_split_part, map.blk[j].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_split_part, "%d", map.blk[j].pmPartBlkCnt);
|
||||
msg_prompt_add (MSG_scratch_size, NULL, buf, sizeof(buf));
|
||||
size = atoi(buf);
|
||||
if (size > 0 && size < map.blk[j].pmPartBlkCnt) {
|
||||
|
@ -129,19 +129,19 @@ menu editparttable, title "Escoja su particion", exit, y=14;
|
|||
option "Arreglar particion seleccionada", action {
|
||||
int i = map.mblk[map.selected];
|
||||
EBZB *bzb = (EBZB *)&map.blk[i].pmBootArgs[0];
|
||||
msg_display(MSG_partdebug, pm->diskdev, bzb->flags.part,
|
||||
map.blk[i].pmPyPartStart,
|
||||
msg_fmt_display(MSG_partdebug, "%s%c%d%d", pm->diskdev,
|
||||
bzb->flags.part, map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
if ((map.blk[i].pmPyPartStart +
|
||||
map.blk[i].pmPartBlkCnt) > pm->dlsize) {
|
||||
msg_display_add(MSG_parttable_fix_fixing,
|
||||
msg_fmt_display_add(MSG_parttable_fix_fixing, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
map.blk[i].pmPartBlkCnt =
|
||||
pm->dlsize - map.blk[i].pmPyPartStart;
|
||||
map.blk[i].pmDataCnt =
|
||||
map.blk[i].pmPartBlkCnt;
|
||||
} else {
|
||||
msg_display_add(MSG_parttable_fix_fine,
|
||||
msg_fmt_display_add(MSG_parttable_fix_fine, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
}
|
||||
process_menu(MENU_ok, NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.md.pl,v 1.5 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: menus.md.pl,v 1.6 2019/06/20 00:43:56 christos Exp $ */
|
||||
/* Based on english version: */
|
||||
/* NetBSD: menus.md.en,v 1.13 2001/11/29 23:20:58 thorpej Exp */
|
||||
|
||||
|
@ -41,7 +41,7 @@ menu fullpart, title "Wybierz";
|
|||
option "Uzyj calego dysku", exit, action {usefull = 1;};
|
||||
|
||||
menu nodiskmap, title "Wybierz opcje", y=16;
|
||||
display action { msg_display (MSG_nodiskmap, pm->diskdev); };
|
||||
display action { msg_fmt_display (MSG_nodiskmap, "%s", pm->diskdev); };
|
||||
option "Przerwij instalacje", exit, action {
|
||||
endwin(); exit(1);
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ menu editparttable, title "Wybierz swoje partycje", exit, y=14;
|
|||
EBZB *bzb;
|
||||
|
||||
j = map.mblk[map.selected];
|
||||
msg_display(MSG_split_part, map.blk[j].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_split_part, %d", map.blk[j].pmPartBlkCnt);
|
||||
msg_prompt_add (MSG_scratch_size, NULL, buf, sizeof(buf));
|
||||
size = atoi(buf);
|
||||
if (size > 0 && size < map.blk[j].pmPartBlkCnt) {
|
||||
|
@ -131,19 +131,19 @@ menu editparttable, title "Wybierz swoje partycje", exit, y=14;
|
|||
option "Napraw wybrana partycje", action {
|
||||
int i = map.mblk[map.selected];
|
||||
EBZB *bzb = (EBZB *)&map.blk[i].pmBootArgs[0];
|
||||
msg_display(MSG_partdebug, pm->diskdev, bzb->flags.part,
|
||||
map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
msg_fmt_display(MSG_partdebug, "%s%c%d%d", pm->diskdev,
|
||||
bzb->flags.part, map.blk[i].pmPyPartStart,
|
||||
map.blk[i].pmPartBlkCnt);
|
||||
if ((map.blk[i].pmPyPartStart +
|
||||
map.blk[i].pmPartBlkCnt) > pm->dlsize) {
|
||||
msg_display_add(MSG_parttable_fix_fixing,
|
||||
pm->diskdev, bzb->flags.part);
|
||||
msg_fmt_display_add(MSG_parttable_fix_fixing, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
map.blk[i].pmPartBlkCnt =
|
||||
pm->dlsize - map.blk[i].pmPyPartStart;
|
||||
map.blk[i].pmDataCnt =
|
||||
map.blk[i].pmPartBlkCnt;
|
||||
} else {
|
||||
msg_display_add(MSG_parttable_fix_fine,
|
||||
msg_fmt_display_add(MSG_parttable_fix_fine, "%s%c",
|
||||
pm->diskdev, bzb->flags.part);
|
||||
}
|
||||
process_menu(MENU_ok, NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -176,7 +176,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
if (install->num == 0 || install->infos[0].cur_start != 0)
|
||||
return 0;
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/ofwboot", bootfile);
|
||||
sync();
|
||||
run_program(RUN_DISPLAY, "/usr/sbin/installboot /dev/r%sa %s %s",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -162,7 +162,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
return 0;
|
||||
}
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", "/boot");
|
||||
if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
|
||||
"/usr/mdec/installboot /dev/r%sc /usr/mdec/bootxx_ffs", pm->diskdev))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -140,7 +140,7 @@ md_check_partitions(struct install_partition_desc *install)
|
|||
snprintf(desc, sizeof desc,
|
||||
"%zu (%s)", i,
|
||||
install->infos[i].mount);
|
||||
msg_display(MSG_ordering, desc);
|
||||
msg_fmt_display(MSG_ordering, "%s", desc);
|
||||
if (!ask_yesno(NULL))
|
||||
return false;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
{
|
||||
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/bootsd", "/.bootsd");
|
||||
if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
|
||||
"/usr/mdec/installboot %s /usr/mdec/bootxx /dev/r%sa",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:21 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -155,7 +155,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
{
|
||||
const char *bootfile = "/boot";
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", bootfile);
|
||||
sync();
|
||||
run_program(RUN_DISPLAY, "/usr/sbin/installboot /dev/r%sc %s %s",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:22 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -151,7 +151,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
{
|
||||
const char *bootfile = "/boot";
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", bootfile);
|
||||
sync();
|
||||
run_program(RUN_DISPLAY, "/usr/sbin/installboot /dev/r%sc %s %s",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.5 2019/06/13 09:36:55 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.6 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -176,7 +176,7 @@ rdb_edit_check:
|
|||
ptend = pm->ptstart + pm->ptsize;
|
||||
|
||||
/* Ask for layout type -- standard or special */
|
||||
msg_display(MSG_layout,
|
||||
msg_fmt_display(MSG_layout, "%d%d%d",
|
||||
pm->ptsize / (MEG / pm->sectorsize),
|
||||
DEFROOTSIZE + DEFSWAPSIZE + DEFUSRSIZE,
|
||||
DEFROOTSIZE + DEFSWAPSIZE + DEFUSRSIZE + XNEEDMB);
|
||||
|
@ -395,7 +395,7 @@ md_post_disklabel(struct install_partition_desc *install,
|
|||
return 0;
|
||||
|
||||
snprintf(bootdev, sizeof bootdev, "/dev/r%s%c", pm->diskdev,
|
||||
'a'+bootpart_fat12);
|
||||
(char)('a'+bootpart_fat12));
|
||||
run_program(RUN_DISPLAY, "/sbin/newfs_msdos %s", bootdev);
|
||||
|
||||
return 0;
|
||||
|
@ -501,7 +501,8 @@ md_pre_update(struct install_partition_desc *install)
|
|||
if (part->mbrp_type == MBR_PTYPE_RESERVED_x21 &&
|
||||
part->mbrp_size < (MIN_FAT12_BOOT/512)) {
|
||||
msg_display(MSG_boottoosmall);
|
||||
msg_display_add(MSG_nobootpartdisklabel, 0);
|
||||
msg_fmt_display_add(MSG_nobootpartdisklabel,
|
||||
"%d", 0);
|
||||
if (!ask_yesno(NULL))
|
||||
return 0;
|
||||
nobootfix = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:22 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -86,7 +86,8 @@ md_get_info(struct install_partition_desc *install)
|
|||
pm->dlsize = ps->size_limit;
|
||||
}
|
||||
|
||||
msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead, pm->dlsec);
|
||||
msg_fmt_display(MSG_nobiosgeom, "%d%d%d",
|
||||
pm->dlcyl, pm->dlhead, pm->dlsec);
|
||||
|
||||
if (guess_biosgeom_from_parts(pm->parts, &cyl, &head, &sec) >= 0
|
||||
&& pm->parts->pscheme->change_disk_geom != NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:22 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -163,7 +163,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
return 0;
|
||||
}
|
||||
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot.pmax", "/boot.pmax");
|
||||
bootxx = bootxx_name(install);
|
||||
if (bootxx != NULL) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/13 09:36:55 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -184,8 +184,10 @@ md_post_extract(struct install_partition_desc *install)
|
|||
else
|
||||
snprintf(bootloader, 100, "/usr/mdec/boot");
|
||||
|
||||
snprintf(rawdev, 100, "/dev/r%s%c", pm->diskdev, 'a' + getrawpartition());
|
||||
snprintf(bootpart, 100, "/dev/r%s%c", pm->diskdev, 'a' + prep_bootpart);
|
||||
snprintf(rawdev, 100, "/dev/r%s%c", pm->diskdev,
|
||||
(char)('a' + getrawpartition()));
|
||||
snprintf(bootpart, 100, "/dev/r%s%c", pm->diskdev,
|
||||
(char)('a' + prep_bootpart));
|
||||
if (prep_rawdevfix)
|
||||
run_program(RUN_DISPLAY|RUN_CHROOT,
|
||||
"/usr/mdec/mkbootimage -b %s -k /netbsd "
|
||||
|
@ -218,9 +220,9 @@ md_pre_update(struct install_partition_desc *install)
|
|||
for (i = 0; i < install->num; i++) {
|
||||
if (install->infos[i].fs_type != PART_BOOT_TYPE)
|
||||
continue;
|
||||
if (install->infos[i].size < (MIN_PREP_BOOT/512)) {
|
||||
if (install->infos[i].size < (int)(MIN_PREP_BOOT/512)) {
|
||||
msg_display(MSG_preptoosmall);
|
||||
msg_display_add(MSG_prepnobootpart, 0);
|
||||
msg_fmt_display_add(MSG_prepnobootpart, "%d", 0);
|
||||
if (!ask_yesno(NULL))
|
||||
return 0;
|
||||
prep_nobootfix = 1;
|
||||
|
@ -258,7 +260,7 @@ md_check_mbr(struct disk_partitions *parts, mbr_info_t *mbri, bool quiet)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (pm->bootsize < (MIN_PREP_BOOT/512)) {
|
||||
if (pm->bootsize < (int)(MIN_PREP_BOOT/512)) {
|
||||
msg_display(MSG_preptoosmall);
|
||||
return ask_reedit(parts);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -132,7 +132,7 @@ md_pre_disklabel(struct install_partition_desc *install,
|
|||
char diskpath[MAXPATHLEN];
|
||||
|
||||
if (clear_mbr(pm->diskdev, diskpath, sizeof(diskpath)) == -1) {
|
||||
msg_display(MSG_badclearmbr, diskpath);
|
||||
msg_fmt_display(MSG_badclearmbr, "%s", diskpath);
|
||||
process_menu(MENU_ok, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:58 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -120,7 +120,7 @@ md_post_newfs(struct install_partition_desc *install)
|
|||
{
|
||||
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
return (run_program(RUN_DISPLAY, "/sbin/disklabel -W %s", pm->diskdev) ||
|
||||
run_program(RUN_DISPLAY, "/usr/mdec/binstall ffs %s",
|
||||
targetroot_mnt));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.3 2019/06/12 06:20:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.4 2019/06/20 00:43:58 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -155,7 +155,7 @@ static void
|
|||
install_bootblocks(void)
|
||||
{
|
||||
/* Install boot blocks before mounting the target disk */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
run_program(RUN_DISPLAY, "/sbin/disklabel -W %s", pm->diskdev);
|
||||
run_program(RUN_DISPLAY, "/usr/sbin/installboot /dev/r%sc"
|
||||
" /usr/mdec/bootblk", pm->diskdev);
|
||||
|
@ -166,7 +166,7 @@ static void
|
|||
install_ofwboot(void)
|
||||
{
|
||||
/* copy secondary bootstrap now that the target is mounted */
|
||||
msg_display(MSG_doofwboot, targetroot_mnt);
|
||||
msg_fmt_display(MSG_doofwboot, "%s", targetroot_mnt);
|
||||
run_program(RUN_DISPLAY, "/bin/cp -p /usr/mdec/ofwboot %s",
|
||||
targetroot_mnt);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.4 2019/06/12 06:20:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.5 2019/06/20 00:43:58 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -157,7 +157,7 @@ md_post_disklabel(struct install_partition_desc *install,
|
|||
int
|
||||
md_post_newfs(struct install_partition_desc *install)
|
||||
{
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
run_program(0, "/usr/sbin/installboot /dev/r%s%c /usr/mdec/%.2sboot",
|
||||
pm->diskdev, 'a' + getrawpartition(), pm->diskdev);
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md.c,v 1.6 2019/06/12 06:20:23 martin Exp $ */
|
||||
/* $NetBSD: md.c,v 1.7 2019/06/20 00:43:58 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -168,7 +168,7 @@ md_check_partitions(struct install_partition_desc *install)
|
|||
snprintf(desc, sizeof desc,
|
||||
"%zu (%s)", i,
|
||||
install->infos[i].mount);
|
||||
msg_display(MSG_ordering, desc);
|
||||
msg_fmt_display(MSG_ordering, "%s", desc);
|
||||
if (ask_yesno(NULL))
|
||||
return false;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ md_check_partitions(void)
|
|||
j++;
|
||||
}
|
||||
if (j > 6) {
|
||||
msg_display(MSG_nofreepart, pm->diskdev);
|
||||
msg_fmt_display(MSG_nofreepart, "%s" pm->diskdev);
|
||||
return 0;
|
||||
}
|
||||
md_nfreepart = 8 - j;
|
||||
|
@ -227,7 +227,7 @@ md_check_partitions(void)
|
|||
/* check for free space */
|
||||
fspm->ptsize = pm->bsdlabel[A].pi_offset - 64;
|
||||
if (fpm->ptsize <= 0) { /* XXX: should not be 0; minfsdb? */
|
||||
msg_display(MSG_notfirst, pm->diskdev);
|
||||
msg_fmt_display(MSG_notfirst, "%s", pm->diskdev);
|
||||
process_menu(MENU_ok);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ int
|
|||
md_post_newfs(struct install_partition_desc *install)
|
||||
{
|
||||
/* boot blocks ... */
|
||||
msg_display(MSG_dobootblks, pm->diskdev);
|
||||
msg_fmt_display(MSG_dobootblks, "%s", pm->diskdev);
|
||||
cp_to_target("/usr/mdec/boot", "/boot");
|
||||
if (run_program(RUN_DISPLAY | RUN_NO_CLEAR,
|
||||
"/usr/mdec/installboot.new /usr/mdec/sdboot_ufs /dev/r%sa",
|
||||
|
@ -310,7 +310,7 @@ md_update(struct install_partition_desc *install)
|
|||
static int
|
||||
md_newdisk(void)
|
||||
{
|
||||
msg_display(MSG_newdisk, pm->diskdev, pm->diskdev);
|
||||
msg_fmt_display(MSG_newdisk, "%s%s", pm->diskdev, pm->diskdev);
|
||||
|
||||
return run_program(RUN_FATAL|RUN_DISPLAY,
|
||||
"/usr/mdec/newdisk -v %s", pm->diskdev);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bsddisklabel.c,v 1.12 2019/06/15 08:20:33 martin Exp $ */
|
||||
/* $NetBSD: bsddisklabel.c,v 1.13 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -524,9 +524,8 @@ set_ptn_size(menudesc *m, void *arg)
|
|||
size, p->flags & PUIFLAG_EXTEND ? "+" : "");
|
||||
|
||||
for (;;) {
|
||||
msg_prompt_win(MSG_askfssize, -1, 18, 0, 0,
|
||||
dflt, answer, sizeof answer,
|
||||
p->mount, multname);
|
||||
msg_fmt_prompt_win(MSG_askfssize, -1, 18, 0, 0,
|
||||
dflt, answer, sizeof answer, "%s%s", p->mount, multname);
|
||||
|
||||
/* cp will be checked below */
|
||||
mult = sizemult;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: configmenu.c,v 1.6 2019/06/12 06:20:17 martin Exp $ */
|
||||
/* $NetBSD: configmenu.c,v 1.7 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
|
@ -391,8 +391,8 @@ toggle_rcvar(struct menudesc *menu, void *arg)
|
|||
}
|
||||
|
||||
if (!(fp = fopen(target_expand("/etc/rc.conf"), "r"))) {
|
||||
msg_display(MSG_openfail, target_expand("/etc/rc.conf"),
|
||||
strerror(errno));
|
||||
msg_fmt_display(MSG_openfail, "%s%s",
|
||||
target_expand("/etc/rc.conf"), strerror(errno));
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disks.c,v 1.32 2019/06/15 08:20:33 martin Exp $ */
|
||||
/* $NetBSD: disks.c,v 1.33 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -880,7 +880,7 @@ find_disks(const char *doingwhat)
|
|||
NULL, NULL, NULL, NULL, NULL);
|
||||
if (menu_no == -1)
|
||||
return -1;
|
||||
msg_display(MSG_ask_disk, doingwhat);
|
||||
msg_fmt_display(MSG_ask_disk, "%s", doingwhat);
|
||||
process_menu(menu_no, &selected_disk);
|
||||
free_menu(menu_no);
|
||||
}
|
||||
|
@ -1432,7 +1432,7 @@ foundffs(struct data *list, size_t num)
|
|||
|
||||
error = target_mount("", list[0].u.s_val, list[1].u.s_val);
|
||||
if (error != 0) {
|
||||
msg_display(MSG_mount_failed, list[0].u.s_val);
|
||||
msg_fmt_display(MSG_mount_failed, "%s", list[0].u.s_val);
|
||||
if (!ask_noyes(NULL))
|
||||
return error;
|
||||
}
|
||||
|
@ -1613,7 +1613,7 @@ mount_disks(struct install_partition_desc *install)
|
|||
/* Check the target /etc/fstab exists before trying to parse it. */
|
||||
if (target_dir_exists_p("/etc") == 0 ||
|
||||
target_file_exists_p("/etc/fstab") == 0) {
|
||||
msg_display(MSG_noetcfstab, pm->diskdev);
|
||||
msg_fmt_display(MSG_noetcfstab, "%s", pm->diskdev);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1623,7 +1623,7 @@ mount_disks(struct install_partition_desc *install)
|
|||
fstabsize = target_collect_file(T_FILE, &fstab, "/etc/fstab");
|
||||
if (fstabsize < 0) {
|
||||
/* error ! */
|
||||
msg_display(MSG_badetcfstab, pm->diskdev);
|
||||
msg_fmt_display(MSG_badetcfstab, "%s", pm->diskdev);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -2;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: install.c,v 1.7 2019/06/15 08:20:33 martin Exp $ */
|
||||
/* $NetBSD: install.c,v 1.8 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -171,7 +171,7 @@ do_install(void)
|
|||
/* Last chance ... do you really want to do this? */
|
||||
clear();
|
||||
refresh();
|
||||
msg_display(MSG_lastchance, pm->diskdev);
|
||||
msg_fmt_display(MSG_lastchance, "%s", pm->diskdev);
|
||||
if (!ask_noyes(NULL))
|
||||
return;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mbr.c,v 1.14 2019/06/19 17:32:31 martin Exp $ */
|
||||
/* $NetBSD: mbr.c,v 1.15 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -240,9 +240,10 @@ set_bios_geom_with_mbr_guess(struct disk_partitions *parts)
|
|||
{
|
||||
int cyl, head, sec;
|
||||
|
||||
msg_display(MSG_nobiosgeom, pm->dlcyl, pm->dlhead, pm->dlsec);
|
||||
msg_fmt_display(MSG_nobiosgeom, "%d%d%d", pm->dlcyl, pm->dlhead,
|
||||
pm->dlsec);
|
||||
if (guess_biosgeom_from_parts(parts, &cyl, &head, &sec) >= 0)
|
||||
msg_display_add(MSG_biosguess, cyl, head, sec);
|
||||
msg_fmt_display_add(MSG_biosguess, "%d%d%d", cyl, head, sec);
|
||||
set_bios_geom(parts, &cyl, &head, &sec);
|
||||
if (parts->pscheme->change_disk_geom)
|
||||
parts->pscheme->change_disk_geom(parts, cyl, head, sec);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: menus.mi,v 1.17 2019/06/12 06:20:17 martin Exp $ */
|
||||
/* $NetBSD: menus.mi,v 1.18 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -368,7 +368,8 @@ menu distset, title MSG_Select_your_distribution, exit,
|
|||
|
||||
menu ftpsource, y=-4, x=0, w=70, no box, no clear,
|
||||
exitstring MSG_Get_Distribution;
|
||||
display action { msg_display(MSG_ftpsource, url_proto((uintptr_t)((arg_rv*)arg)->arg)); };
|
||||
display action { msg_fmt_display(MSG_ftpsource, "%s",
|
||||
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);},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: net.c,v 1.28 2019/06/18 10:45:27 martin Exp $ */
|
||||
/* $NetBSD: net.c,v 1.29 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -453,7 +453,8 @@ handle_license(const char *dev)
|
|||
if (sysctlbyname(buf, &val, &len, NULL, 0) != -1
|
||||
&& val != 0)
|
||||
return 1;
|
||||
msg_display(MSG_license, dev, licdev[i].lic);
|
||||
msg_fmt_display(MSG_license, "%s%s",
|
||||
dev, licdev[i].lic);
|
||||
if (ask_yesno(NULL)) {
|
||||
val = 1;
|
||||
if (sysctlbyname(buf, NULL, NULL, &val,
|
||||
|
@ -520,7 +521,7 @@ again:
|
|||
net_menu, num_devs, -1, 4, 0, 0,
|
||||
MC_SCROLL,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
msg_display(MSG_asknetdev, "");
|
||||
msg_display(MSG_asknetdev);
|
||||
process_menu(menu_no, &selected_net);
|
||||
free_menu(menu_no);
|
||||
|
||||
|
@ -724,7 +725,9 @@ again:
|
|||
|
||||
/* confirm the setting */
|
||||
if (slip)
|
||||
msg_display(MSG_netok_slip, net_domain, net_host,
|
||||
msg_fmt_display(MSG_netok_slip, "%s%s%s%s%s%s%s%s%s",
|
||||
net_domain,
|
||||
net_host,
|
||||
*net_namesvr == '\0' ? "<none>" : net_namesvr,
|
||||
net_dev,
|
||||
*net_media == '\0' ? "<default>" : net_media,
|
||||
|
@ -733,7 +736,9 @@ again:
|
|||
*net_mask == '\0' ? "<none>" : net_mask,
|
||||
*net_defroute == '\0' ? "<none>" : net_defroute);
|
||||
else
|
||||
msg_display(MSG_netok, net_domain, net_host,
|
||||
msg_fmt_display(MSG_netok, "%s%s%s%s%s%s%s%s",
|
||||
net_domain,
|
||||
net_host,
|
||||
*net_namesvr == '\0' ? "<none>" : net_namesvr,
|
||||
net_dev,
|
||||
*net_media == '\0' ? "<default>" : net_media,
|
||||
|
@ -741,7 +746,7 @@ again:
|
|||
*net_mask == '\0' ? "<none>" : net_mask,
|
||||
*net_defroute == '\0' ? "<none>" : net_defroute);
|
||||
#ifdef INET6
|
||||
msg_display_add(MSG_netokv6,
|
||||
msg_fmt_display_add(MSG_netokv6, "%s",
|
||||
!is_v6kernel() ? "<not supported>" : net_ip6);
|
||||
#endif
|
||||
done:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: part_edit.c,v 1.3 2019/06/16 13:02:29 martin Exp $ */
|
||||
/* $NetBSD: part_edit.c,v 1.4 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 The NetBSD Foundation, Inc.
|
||||
|
@ -97,8 +97,8 @@ err_msg_win(const char *errmsg)
|
|||
if (l < l1)
|
||||
l = l1;
|
||||
|
||||
msg_prompt_win("%s.\n%s", -1, 18, l + 5, 2+lines,
|
||||
NULL, NULL, 1, errmsg, cont);
|
||||
msg_fmt_prompt_win("%s.\n%s", -1, 18, l + 5, 2+lines,
|
||||
NULL, NULL, 1, "%s%s", errmsg, cont);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: partman.c,v 1.33 2019/06/17 17:53:41 martin Exp $ */
|
||||
/* $NetBSD: partman.c,v 1.34 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2012 Eugene Lozovoy
|
||||
|
@ -982,8 +982,8 @@ pm_vnd_set_value(menudesc *m, void *arg)
|
|||
|
||||
switch (m->cursel) {
|
||||
case PMV_MENU_FILEPATH:
|
||||
msg_prompt_win(MSG_vnd_path_ask, -1, 18, 0, 0, dev_ptr->filepath,
|
||||
dev_ptr->filepath, STRSIZE);
|
||||
msg_prompt_win(MSG_vnd_path_ask, -1, 18, 0, 0,
|
||||
dev_ptr->filepath, dev_ptr->filepath, STRSIZE);
|
||||
if (dev_ptr->filepath[0] != '/') {
|
||||
strlcpy(buf, dev_ptr->filepath, MOUNTLEN);
|
||||
snprintf(dev_ptr->filepath, MOUNTLEN, "/%s", buf);
|
||||
|
@ -1609,7 +1609,8 @@ pm_lvm_set_value(menudesc *m, void *arg)
|
|||
process_menu(menu_disk_adddel, arg);
|
||||
return 0;
|
||||
case PML_MENU_NAME:
|
||||
msg_prompt_win(MSG_lvm_name_ask, -1, 18, 0, 0, dev_ptr->name, dev_ptr->name, SSTRSIZE);
|
||||
msg_prompt_win(MSG_lvm_name_ask, -1, 18, 0, 0,
|
||||
dev_ptr->name, dev_ptr->name, SSTRSIZE);
|
||||
return 0;
|
||||
case PML_MENU_MAXLOGICALVOLUMES:
|
||||
msg_to_show = MSG_lvm_maxlv_ask;
|
||||
|
@ -1798,7 +1799,7 @@ pm_lvmlv_set_value(menudesc *m, void *arg)
|
|||
return 0;
|
||||
case PMLV_MENU_EXTENTS:
|
||||
msg_prompt_win(MSG_lvmlv_extnum_ask, -1, 18, 0, 0,
|
||||
dev_ptr->extents, dev_ptr->extents, SSTRSIZE);
|
||||
dev_ptr->extents, dev_ptr->extents, SSTRSIZE);
|
||||
return 0;
|
||||
case PMLV_MENU_MINOR:
|
||||
msg_to_show = MSG_lvmlv_minor_ask;
|
||||
|
@ -2058,7 +2059,7 @@ pm_partusage(struct pm_devs *pm_cur, int part_num, int do_del)
|
|||
cgds[i].pm_part == id) {
|
||||
if (do_del) {
|
||||
cgds[i].pm = NULL;
|
||||
strcpy(cgds[i].pm_name, "");
|
||||
cgds[i].pm_name[0] = '\0';
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: run.c,v 1.10 2019/02/27 12:59:35 martin Exp $ */
|
||||
/* $NetBSD: run.c,v 1.11 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -131,8 +131,8 @@ log_flip(menudesc *m, void *arg)
|
|||
fflush(logfp);
|
||||
} else {
|
||||
if (mainwin) {
|
||||
msg_display(MSG_openfail, "log file",
|
||||
strerror(errno));
|
||||
msg_fmt_display(MSG_openfail, "%s%s",
|
||||
"log file", strerror(errno));
|
||||
} else {
|
||||
fprintf(stderr, "could not open /tmp/sysinst.log: %s\n",
|
||||
strerror(errno));
|
||||
|
@ -164,7 +164,7 @@ script_flip(menudesc *m, void *arg)
|
|||
safectime(&tloc));
|
||||
fflush(script);
|
||||
} else {
|
||||
msg_display(MSG_openfail, "script file",
|
||||
msg_fmt_display(MSG_openfail, "%s%s", "script file",
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: upgrade.c,v 1.7 2019/06/12 06:20:18 martin Exp $ */
|
||||
/* $NetBSD: upgrade.c,v 1.8 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -144,9 +144,10 @@ save_X(const char *xroot)
|
|||
/* Only care for X if it's a symlink */
|
||||
if (target_symlink_exists_p(newx)) {
|
||||
if (target_symlink_exists_p(oldx)) {
|
||||
msg_display(MSG_X_oldexists, xroot, xroot, xroot,
|
||||
msg_fmt_display(MSG_X_oldexists,
|
||||
"%s%s%s%s%s%s%s%s%s%s%s",
|
||||
xroot, xroot, xroot, xroot, xroot, xroot, xroot,
|
||||
xroot);
|
||||
xroot, xroot, xroot, xroot);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return EEXIST;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.23 2019/06/18 10:46:51 martin Exp $ */
|
||||
/* $NetBSD: util.c,v 1.24 2019/06/20 00:43:55 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -319,7 +319,7 @@ floppy_fetch(const char *set_name)
|
|||
for (;;) {
|
||||
umount_mnt2();
|
||||
msg_display(errmsg);
|
||||
msg_display_add(MSG_fdmount, set_name, post);
|
||||
msg_fmt_display_add(MSG_fdmount, "%s%s", set_name, post);
|
||||
process_menu(menu, &status);
|
||||
if (status != SET_CONTINUE)
|
||||
return status;
|
||||
|
@ -970,7 +970,7 @@ extract_file(distinfo *dist, int update)
|
|||
/* Check rval for errors and give warning. */
|
||||
if (rval != 0) {
|
||||
tarstats.nerror++;
|
||||
msg_display(MSG_tarerror, path);
|
||||
msg_fmt_display(MSG_tarerror, "%s", path);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return SET_RETRY;
|
||||
}
|
||||
|
@ -1053,7 +1053,8 @@ get_and_unpack_sets(int update, msg setupdone_msg, msg success_msg, msg failure_
|
|||
/* Sort out the location of the set files */
|
||||
do {
|
||||
umount_mnt2();
|
||||
msg_display(MSG_distmedium, tarstats.nselected,
|
||||
msg_fmt_display(MSG_distmedium, "%d%d%s",
|
||||
tarstats.nselected,
|
||||
tarstats.nsuccess + tarstats.nskipped,
|
||||
dist->name);
|
||||
fetch_fn = NULL;
|
||||
|
@ -1087,7 +1088,7 @@ get_and_unpack_sets(int update, msg setupdone_msg, msg success_msg, msg failure_
|
|||
sleep(1);
|
||||
} else {
|
||||
/* We encountered errors. Let the user know. */
|
||||
msg_display(MSG_endtar,
|
||||
msg_fmt_display(MSG_endtar, "%d%d%d%d%d%d",
|
||||
tarstats.nselected, tarstats.nnotfound, tarstats.nskipped,
|
||||
tarstats.nfound, tarstats.nsuccess, tarstats.nerror);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
|
@ -1208,7 +1209,7 @@ check_for(unsigned int mode, const char *pathname)
|
|||
|
||||
found = (target_test(mode, pathname) == 0);
|
||||
if (found == 0)
|
||||
msg_display(MSG_rootmissing, pathname);
|
||||
msg_fmt_display(MSG_rootmissing, "%s", pathname);
|
||||
return found;
|
||||
}
|
||||
|
||||
|
@ -1271,7 +1272,7 @@ set_tz_select(menudesc *m, void *arg)
|
|||
/* Update displayed time */
|
||||
t = time(NULL);
|
||||
tm = localtime(&t);
|
||||
msg_display(MSG_choose_timezone,
|
||||
msg_fmt_display(MSG_choose_timezone, "%s%s%s%s",
|
||||
tz_default, tz_selected, safectime(&t), tm ? tm->tm_zone :
|
||||
"?");
|
||||
return 0;
|
||||
|
@ -1443,9 +1444,8 @@ set_timezone(void)
|
|||
setenv("TZ", tz_env, 1);
|
||||
t = time(NULL);
|
||||
tm = localtime(&t);
|
||||
msg_display(MSG_choose_timezone,
|
||||
tz_default, tz_selected, safectime(&t), tm ? tm->tm_zone :
|
||||
"?");
|
||||
msg_fmt_display(MSG_choose_timezone, "%s%s%s%s",
|
||||
tz_default, tz_selected, safectime(&t), tm ? tm->tm_zone : "?");
|
||||
|
||||
signal(SIGALRM, timezone_sig);
|
||||
alarm(60);
|
||||
|
@ -1532,13 +1532,13 @@ del_rc_conf(const char *value)
|
|||
free(rcconf);
|
||||
if (tempname)
|
||||
free(tempname);
|
||||
msg_display(MSG_rcconf_delete_failed, value);
|
||||
msg_fmt_display(MSG_rcconf_delete_failed, "%s", value);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((fd = mkstemp(bakname)) < 0) {
|
||||
msg_display(MSG_rcconf_delete_failed, value);
|
||||
msg_fmt_display(MSG_rcconf_delete_failed, "%s", value);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1547,7 +1547,7 @@ del_rc_conf(const char *value)
|
|||
if (!(fp = fopen(rcconf, "r+")) || (fd = mkstemp(tempname)) < 0) {
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
msg_display(MSG_rcconf_delete_failed, value);
|
||||
msg_fmt_display(MSG_rcconf_delete_failed, "%s", value);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1556,7 +1556,7 @@ del_rc_conf(const char *value)
|
|||
if (!nfp) {
|
||||
fclose(fp);
|
||||
close(fd);
|
||||
msg_display(MSG_rcconf_delete_failed, value);
|
||||
msg_fmt_display(MSG_rcconf_delete_failed, "%s", value);
|
||||
hit_enter_to_continue(NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1887,13 +1887,13 @@ needs_expanding(const char *src, size_t argc)
|
|||
* with the result.
|
||||
*/
|
||||
static void
|
||||
msg_display_subst_internal(void (*outfunc)(msg,...), const char *master,
|
||||
size_t argc, va_list ap)
|
||||
msg_display_subst_internal(void (*outfunc)(msg),
|
||||
const char *master, size_t argc, va_list ap)
|
||||
{
|
||||
const char **args, **arg;
|
||||
char *out;
|
||||
|
||||
args = malloc(sizeof(const char *)*argc);
|
||||
args = calloc(argc, sizeof(*args));
|
||||
if (args == NULL)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue