Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Use _fmt_ msg_ methods when formats are nee...
details: https://anonhg.NetBSD.org/src/rev/b3d2712ea7bf
branches: trunk
changeset: 999824:b3d2712ea7bf
user: christos <christos%NetBSD.org@localhost>
date: Thu Jun 20 00:43:55 2019 +0000
description:
Use _fmt_ msg_ methods when formats are needed.
diffstat:
usr.sbin/sysinst/arch/alpha/md.c | 4 +-
usr.sbin/sysinst/arch/amiga/md.c | 4 +-
usr.sbin/sysinst/arch/arc/md.c | 7 +++--
usr.sbin/sysinst/arch/atari/md.c | 6 ++--
usr.sbin/sysinst/arch/cobalt/md.c | 7 +++--
usr.sbin/sysinst/arch/emips/md.c | 4 +-
usr.sbin/sysinst/arch/hp300/md.c | 6 ++--
usr.sbin/sysinst/arch/hppa/md.c | 4 +-
usr.sbin/sysinst/arch/i386/md.c | 22 ++++++++++++--------
usr.sbin/sysinst/arch/i386/menus.md | 4 +-
usr.sbin/sysinst/arch/landisk/md.c | 4 +-
usr.sbin/sysinst/arch/luna68k/md.c | 4 +-
usr.sbin/sysinst/arch/mac68k/md.c | 27 ++++++++++++++-----------
usr.sbin/sysinst/arch/mac68k/menus.md.de | 18 ++++++++--------
usr.sbin/sysinst/arch/mac68k/menus.md.en | 19 +++++++++--------
usr.sbin/sysinst/arch/mac68k/menus.md.es | 14 ++++++------
usr.sbin/sysinst/arch/mac68k/menus.md.pl | 18 ++++++++--------
usr.sbin/sysinst/arch/macppc/md.c | 4 +-
usr.sbin/sysinst/arch/mipsco/md.c | 4 +-
usr.sbin/sysinst/arch/mvme68k/md.c | 6 ++--
usr.sbin/sysinst/arch/news68k/md.c | 4 +-
usr.sbin/sysinst/arch/newsmips/md.c | 4 +-
usr.sbin/sysinst/arch/ofppc/md.c | 9 ++++---
usr.sbin/sysinst/arch/playstation2/md.c | 5 ++-
usr.sbin/sysinst/arch/pmax/md.c | 4 +-
usr.sbin/sysinst/arch/prep/md.c | 14 +++++++-----
usr.sbin/sysinst/arch/shark/md.c | 4 +-
usr.sbin/sysinst/arch/sparc/md.c | 4 +-
usr.sbin/sysinst/arch/sparc64/md.c | 6 ++--
usr.sbin/sysinst/arch/vax/md.c | 4 +-
usr.sbin/sysinst/arch/x68k/md.c | 12 +++++-----
usr.sbin/sysinst/bsddisklabel.c | 7 ++---
usr.sbin/sysinst/configmenu.c | 6 ++--
usr.sbin/sysinst/disks.c | 10 ++++----
usr.sbin/sysinst/install.c | 4 +-
usr.sbin/sysinst/mbr.c | 7 +++--
usr.sbin/sysinst/menus.mi | 5 ++-
usr.sbin/sysinst/net.c | 17 ++++++++++-----
usr.sbin/sysinst/part_edit.c | 6 ++--
usr.sbin/sysinst/partman.c | 13 ++++++-----
usr.sbin/sysinst/run.c | 8 +++---
usr.sbin/sysinst/upgrade.c | 7 +++--
usr.sbin/sysinst/util.c | 34 ++++++++++++++++----------------
43 files changed, 201 insertions(+), 179 deletions(-)
diffs (truncated from 1409 to 300 lines):
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/alpha/md.c
--- a/usr.sbin/sysinst/arch/alpha/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/alpha/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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) {
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/amiga/md.c
--- a/usr.sbin/sysinst/arch/amiga/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/amiga/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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);
}
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/arc/md.c
--- a/usr.sbin/sysinst/arch/arc/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/arc/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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 @@
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;
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/atari/md.c
--- a/usr.sbin/sysinst/arch/atari/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/atari/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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 @@
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, "/");
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/cobalt/md.c
--- a/usr.sbin/sysinst/arch/cobalt/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/cobalt/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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 @@
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;
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/emips/md.c
--- a/usr.sbin/sysinst/arch/emips/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/emips/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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,
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/hp300/md.c
--- a/usr.sbin/sysinst/arch/hp300/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/hp300/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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 @@
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,
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/hppa/md.c
--- a/usr.sbin/sysinst/arch/hppa/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/hppa/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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))
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/i386/md.c
--- a/usr.sbin/sysinst/arch/i386/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
}
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 @@
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 @@
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 @@
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 @@
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));
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/i386/menus.md
--- a/usr.sbin/sysinst/arch/i386/menus.md Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/i386/menus.md Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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;
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/landisk/md.c
--- a/usr.sbin/sysinst/arch/landisk/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/landisk/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
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) {
diff -r 675943e9b6b6 -r b3d2712ea7bf usr.sbin/sysinst/arch/luna68k/md.c
--- a/usr.sbin/sysinst/arch/luna68k/md.c Wed Jun 19 23:35:55 2019 +0000
+++ b/usr.sbin/sysinst/arch/luna68k/md.c Thu Jun 20 00:43:55 2019 +0000
@@ -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 @@
{
const char *mntdir = "/mnt2";
- msg_display(MSG_copybootloader, diskdev);
+ msg_fmt_display(MSG_copybootloader, "%s", diskdev);
if (!run_program(RUN_SILENT | RUN_ERROR_OK,
Home |
Main Index |
Thread Index |
Old Index