Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/distrib/utils/sysinst sync with head. yes, this is an u...
details: https://anonhg.NetBSD.org/src/rev/e2434e5d4a07
branches: netbsd-1-4
changeset: 468369:e2434e5d4a07
user: perry <perry%NetBSD.org@localhost>
date: Mon Apr 19 15:19:27 1999 +0000
description:
sync with head. yes, this is an unorthodox pullup.
diffstat:
distrib/utils/sysinst/arch/alpha/md.c | 28 +-
distrib/utils/sysinst/arch/arm32/md.c | 39 ++-
distrib/utils/sysinst/arch/bebox/md.c | 49 +++--
distrib/utils/sysinst/arch/bebox/msg.md.eng | 5 +-
distrib/utils/sysinst/arch/i386/md.c | 105 +++++++----
distrib/utils/sysinst/arch/i386/md.h | 14 +-
distrib/utils/sysinst/arch/i386/menus.md.eng | 4 +-
distrib/utils/sysinst/arch/i386/menus.md.fr | 6 +-
distrib/utils/sysinst/arch/i386/msg.md.eng | 26 ++-
distrib/utils/sysinst/arch/i386/msg.md.fr | 38 ++-
distrib/utils/sysinst/arch/mac68k/md.c | 89 +++++----
distrib/utils/sysinst/arch/macppc/md.c | 25 +-
distrib/utils/sysinst/arch/macppc/menus.md.eng | 2 +-
distrib/utils/sysinst/arch/macppc/menus.md.fr | 2 +-
distrib/utils/sysinst/arch/pc532/md.c | 14 +-
distrib/utils/sysinst/arch/pmax/md.c | 41 ++--
distrib/utils/sysinst/arch/sparc/md.c | 27 +-
distrib/utils/sysinst/arch/vax/md.c | 26 +-
distrib/utils/sysinst/defs.h | 26 +-
distrib/utils/sysinst/disks.c | 56 +++--
distrib/utils/sysinst/install.c | 32 ++-
distrib/utils/sysinst/label.c | 135 ++++++++++++++-
distrib/utils/sysinst/main.c | 4 +-
distrib/utils/sysinst/mbr.c | 32 ++-
distrib/utils/sysinst/mbr.h | 2 +-
distrib/utils/sysinst/menus.mi.eng | 22 +-
distrib/utils/sysinst/menus.mi.fr | 22 +-
distrib/utils/sysinst/msg.mi.eng | 79 +++++++-
distrib/utils/sysinst/msg.mi.fr | 79 +++++++-
distrib/utils/sysinst/net.c | 39 ++-
distrib/utils/sysinst/run.c | 24 +-
distrib/utils/sysinst/target.c | 25 +-
distrib/utils/sysinst/upgrade.c | 7 +-
distrib/utils/sysinst/util.c | 225 ++++++++++++++++++++++--
34 files changed, 947 insertions(+), 402 deletions(-)
diffs (truncated from 3029 to 300 lines):
diff -r 7a9302db9286 -r e2434e5d4a07 distrib/utils/sysinst/arch/alpha/md.c
--- a/distrib/utils/sysinst/arch/alpha/md.c Mon Apr 19 15:19:14 1999 +0000
+++ b/distrib/utils/sysinst/arch/alpha/md.c Mon Apr 19 15:19:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.9 1999/03/31 00:44:49 fvdl Exp $ */
+/* $NetBSD: md.c,v 1.9.2.1 1999/04/19 15:19:28 perry Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -109,15 +109,17 @@
/*
* hook called before writing new disklabel.
*/
-void md_pre_disklabel (void)
+int md_pre_disklabel (void)
{
+ return 0;
}
/*
* hook called after writing disklabel to new target disk.
*/
-void md_post_disklabel (void)
+int md_post_disklabel (void)
{
+ return 0;
}
/*
@@ -129,29 +131,31 @@
*
* On the Alpha, we use this opportunity to install the boot blocks.
*/
-void md_post_newfs (void)
+int md_post_newfs (void)
{
const char *bootfile = target_expand("/boot"); /*XXX*/
printf (msg_string(MSG_dobootblks), diskdev);
cp_to_target("/usr/mdec/boot", "/boot");
- run_prog(0, 0, "/usr/mdec/installboot %s %s /dev/r%sc",
+ run_prog(0, 0, NULL, "/usr/mdec/installboot %s %s /dev/r%sc",
bootfile, "/usr/mdec/bootxx", diskdev);
+ return 0;
}
-void md_copy_filesystem (void)
+int md_copy_filesystem (void)
{
if (target_already_root()) {
- return;
+ return 0;
}
/* Copy the instbin(s) to the disk */
printf ("%s", msg_string(MSG_dotar));
- run_prog(0, 0, "pax -X -r -w -pe / /mnt");
+ if (run_prog(0, 0, NULL, "pax -X -r -w -pe / /mnt") != 0)
+ return 1;
/* Copy next-stage profile into target /.profile. */
- cp_to_target ("/tmp/.hdprofile", "/.profile");
+ return cp_to_target ("/tmp/.hdprofile", "/.profile");
}
int md_make_bsd_partitions (void)
@@ -224,7 +228,7 @@
i = NUMSEC(layoutkind * 2 * (rammb < 32 ? 32 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
@@ -263,11 +267,11 @@
i = NUMSEC(2 * (rammb < 32 ? 32 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
snprintf (isize, 20, "%d", partsize/sizemult);
msg_prompt_add (MSG_askfsswap, isize, isize, 20,
remain/sizemult, multname);
- partsize = NUMSEC(atoi(isize),sizemult, dlcylsize) - swapadj;
+ partsize = NUMSEC(atoi(isize),sizemult, dlcylsize);
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
diff -r 7a9302db9286 -r e2434e5d4a07 distrib/utils/sysinst/arch/arm32/md.c
--- a/distrib/utils/sysinst/arch/arm32/md.c Mon Apr 19 15:19:14 1999 +0000
+++ b/distrib/utils/sysinst/arch/arm32/md.c Mon Apr 19 15:19:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.15 1999/03/31 00:44:49 fvdl Exp $ */
+/* $NetBSD: md.c,v 1.15.2.1 1999/04/19 15:19:28 perry Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -268,37 +268,42 @@
return 1;
}
-void md_pre_disklabel (void)
+int md_pre_disklabel (void)
{
+ return 0;
}
-void md_post_disklabel (void)
+int md_post_disklabel (void)
{
+ return 0;
}
-void md_post_newfs (void)
+int md_post_newfs (void)
{
#if 0
/* XXX boot blocks ... */
printf(msg_string(MSG_dobootblks), diskdev);
- run_prog(0, 1, "/sbin/disklabel -B %s /dev/r%sc",
+ run_prog(0, 1, NULL, "/sbin/disklabel -B %s /dev/r%sc",
"-b /usr/mdec/rzboot -s /usr/mdec/bootrz", diskdev);
#endif
+ return 0;
}
-void md_copy_filesystem (void)
+int md_copy_filesystem (void)
{
if (target_already_root()) {
- return;
+ return 0;
}
/* Copy the instbin(s) to the disk */
printf("%s", msg_string(MSG_dotar));
- run_prog(0, 1, "pax -X -r -w -pe / /mnt");
+ if (run_prog(0, 1, NULL, "pax -X -r -w -pe / /mnt") != 0)
+ return 1;
/* Copy next-stage install profile into target /.profile. */
- cp_to_target("/tmp/.hdprofile", "/.profile");
- cp_to_target("/usr/share/misc/termcap", "/.termcap");
+ if (cp_to_target("/tmp/.hdprofile", "/.profile") != 0)
+ return 1;
+ return cp_to_target("/usr/share/misc/termcap", "/.termcap");
}
int md_make_bsd_partitions (void)
@@ -383,7 +388,7 @@
i = NUMSEC(layoutkind * 2 * (rammb < 32 ? 32 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC(i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
@@ -424,11 +429,11 @@
i = NUMSEC(4 * (rammb < 32 ? 32 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC(i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
snprintf(isize, 20, "%d", partsize/sizemult);
msg_prompt_add(MSG_askfsswap, isize, isize, 20,
remain/sizemult, multname);
- partsize = NUMSEC(atoi(isize),sizemult, dlcylsize) - swapadj;
+ partsize = NUMSEC(atoi(isize),sizemult, dlcylsize);
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
@@ -515,9 +520,9 @@
if (scripting)
(void)fprintf(script, "%s\n", sedcmd);
do_system(sedcmd);
- run_prog(1, 0, "mv -f %s %s", realto, realfrom);
- run_prog(0, 0, "rm -f %s", target_expand("/sysinst"));
- run_prog(0, 0, "rm -f %s", target_expand("/.termcap"));
- run_prog(0, 0, "rm -f %s", target_expand("/.profile"));
+ run_prog(1, 0, NULL, "mv -f %s %s", realto, realfrom);
+ run_prog(0, 0, NULL, "rm -f %s", target_expand("/sysinst"));
+ run_prog(0, 0, NULL, "rm -f %s", target_expand("/.termcap"));
+ run_prog(0, 0, NULL, "rm -f %s", target_expand("/.profile"));
#endif
}
diff -r 7a9302db9286 -r e2434e5d4a07 distrib/utils/sysinst/arch/bebox/md.c
--- a/distrib/utils/sysinst/arch/bebox/md.c Mon Apr 19 15:19:14 1999 +0000
+++ b/distrib/utils/sysinst/arch/bebox/md.c Mon Apr 19 15:19:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.7 1999/03/31 00:44:49 fvdl Exp $ */
+/* $NetBSD: md.c,v 1.7.2.1 1999/04/19 15:19:29 perry Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -62,44 +62,53 @@
return edit_mbr();
}
-void md_pre_disklabel()
+int md_pre_disklabel()
{
printf ("%s", msg_string (MSG_dofdisk));
/* write edited MBR onto disk. */
- write_mbr(diskdev, mbr, sizeof mbr);
+ if (write_mbr(diskdev, mbr, sizeof mbr) != 0) {
+ msg_display(MSG_wmbrfail);
+ process_menu(MENU_ok);
+ return 1;
+ }
+ return 0;
}
-void md_post_disklabel(void)
+int md_post_disklabel(void)
{
/* Sector forwarding / badblocks ... */
if (*doessf) {
printf ("%s", msg_string (MSG_dobad144));
- run_prog(0, 1, "/usr/sbin/bad144 %s 0", diskdev);
+ return run_prog(0, 1, NULL, "/usr/sbin/bad144 %s 0", diskdev);
}
+ return 0;
}
-void md_post_newfs(void)
+int md_post_newfs(void)
{
/* boot blocks ... */
printf (msg_string(MSG_dobootblks), diskdev);
- run_prog (0, 1, "/usr/mdec/installboot -v /usr/mdec/biosboot.sym "
+ run_prog (0, 1, NULL, "/usr/mdec/installboot -v /usr/mdec/biosboot.sym "
"/dev/r%sa", diskdev);
+ return 0;
}
-void md_copy_filesystem (void)
+int md_copy_filesystem (void)
{
if (target_already_root()) {
- return;
+ return 0;
}
/* Copy the instbin(s) to the disk */
printf ("%s", msg_string(MSG_dotar));
- run_prog (0, 1, "pax -X -r -w -pe / /mnt");
+ if (run_prog (0, 1, NULL, "pax -X -r -w -pe / /mnt") != 0)
+ return 1;
/* Copy next-stage install profile into target /.profile. */
- cp_to_target ("/tmp/.hdprofile", "/.profile");
- cp_to_target ("/usr/share/misc/termcap", "/.termcap");
+ if (cp_to_target ("/tmp/.hdprofile", "/.profile")!= 0)
+ return 1;
+ return cp_to_target ("/usr/share/misc/termcap", "/.termcap");
}
@@ -169,7 +178,7 @@
i = NUMSEC(layoutkind * 2 * (rammb < 16 ? 16 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
@@ -210,11 +219,11 @@
i = NUMSEC( 2 * (rammb < 16 ? 16 : rammb),
MEG/sectorsize, dlcylsize) + partstart;
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
- dlcylsize) - partstart - swapadj;
+ dlcylsize) - partstart;
snprintf (isize, 20, "%d", partsize/sizemult);
msg_prompt_add (MSG_askfsswap, isize, isize, 20,
remain/sizemult, multname);
- partsize = NUMSEC(atoi(isize),sizemult, dlcylsize) - swapadj;
+ partsize = NUMSEC(atoi(isize),sizemult, dlcylsize);
bsdlabel[B].pi_offset = partstart;
bsdlabel[B].pi_size = partsize;
partstart += partsize;
@@ -279,7 +288,7 @@
msg_prompt (MSG_packname, "mydisk", bsddiskname, DISKNAME_SIZE);
/* Create the disktab.preinstall */
- run_prog (0, 0, "cp /etc/disktab.preinstall /etc/disktab");
+ run_prog (0, 0, NULL, "cp /etc/disktab.preinstall /etc/disktab");
#ifdef DEBUG
f = fopen ("/tmp/disktab", "a");
#else
@@ -345,8 +354,8 @@
(void)fprintf(script, "%s\n", sedcmd);
do_system(sedcmd);
- run_prog(1, 0, "mv -f %s %s", realto, realfrom);
- run_prog(0, 0, "rm -f %s", target_expand("/sysinst"));
Home |
Main Index |
Thread Index |
Old Index