Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/sysinst * make selection of 'none' for install...



details:   https://anonhg.NetBSD.org/src/rev/4b82c57a23ec
branches:  trunk
changeset: 473929:4b82c57a23ec
user:      cgd <cgd%NetBSD.org@localhost>
date:      Tue Jun 22 06:57:00 1999 +0000

description:
* make selection of 'none' for installation media type return the user
  to the toplevel menu, as promised by the media selection menu, without
  first going through an "installation is aborted" menu.
* when something causes the installation to fail (e.g. missing set or failure
  to extract a set's contents), don't go through N menus
  (missing/failed/aborted, sets didn't install/aborted,
  sanity check failed/aborted) before getting back to the top level.  The
  user only needs to be told once that their life sucks.

diffstat:

 distrib/utils/sysinst/defs.h    |   4 ++--
 distrib/utils/sysinst/install.c |   5 +++--
 distrib/utils/sysinst/upgrade.c |   9 +++++----
 distrib/utils/sysinst/util.c    |  15 +++++++--------
 4 files changed, 17 insertions(+), 16 deletions(-)

diffs (118 lines):

diff -r 7ed1a4da9c7f -r 4b82c57a23ec distrib/utils/sysinst/defs.h
--- a/distrib/utils/sysinst/defs.h      Tue Jun 22 04:29:54 1999 +0000
+++ b/distrib/utils/sysinst/defs.h      Tue Jun 22 06:57:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.44 1999/06/22 02:43:09 cgd Exp $    */
+/*     $NetBSD: defs.h,v 1.45 1999/06/22 06:57:00 cgd Exp $    */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -298,7 +298,7 @@
 void   show_cur_distsets __P((void));
 void   make_ramdisk_dir __P((const char *path));
 void   ask_verbose_dist __P((void));
-void   get_and_unpack_sets(int success_msg, int failure_msg);
+int    get_and_unpack_sets(int success_msg, int failure_msg);
 int    sanity_check __P((void));
 
 /* from target.c */
diff -r 7ed1a4da9c7f -r 4b82c57a23ec distrib/utils/sysinst/install.c
--- a/distrib/utils/sysinst/install.c   Tue Jun 22 04:29:54 1999 +0000
+++ b/distrib/utils/sysinst/install.c   Tue Jun 22 06:57:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: install.c,v 1.18 1999/06/22 00:57:06 cgd Exp $ */
+/*     $NetBSD: install.c,v 1.19 1999/06/22 06:57:00 cgd Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -122,7 +122,8 @@
        wrefresh(stdscr);
 
        /* Unpack the distribution. */
-       get_and_unpack_sets(MSG_instcomplete, MSG_abortinst);
+       if (get_and_unpack_sets(MSG_instcomplete, MSG_abortinst) != 0)
+               return;
 
        sanity_check();
 
diff -r 7ed1a4da9c7f -r 4b82c57a23ec distrib/utils/sysinst/upgrade.c
--- a/distrib/utils/sysinst/upgrade.c   Tue Jun 22 04:29:54 1999 +0000
+++ b/distrib/utils/sysinst/upgrade.c   Tue Jun 22 06:57:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: upgrade.c,v 1.19 1999/06/22 00:57:06 cgd Exp $ */
+/*     $NetBSD: upgrade.c,v 1.20 1999/06/22 06:57:01 cgd Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -101,7 +101,8 @@
        wclear(stdscr);
        wrefresh(stdscr);
 
-       get_and_unpack_sets(MSG_upgrcomplete, MSG_abortupgr);
+       if (get_and_unpack_sets(MSG_upgrcomplete, MSG_abortupgr) != 0)
+               return;
 
        /* Copy back any files we should restore after the upgrade.*/
        merge_etc();
@@ -214,8 +215,8 @@
        wrefresh(stdscr);
 
        /* Unpack the distribution. */
-       get_and_unpack_sets(MSG_unpackcomplete, MSG_abortunpack);
+       if (get_and_unpack_sets(MSG_unpackcomplete, MSG_abortunpack) != 0)
+               return;
 
        sanity_check();
-
 }
diff -r 7ed1a4da9c7f -r 4b82c57a23ec distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c      Tue Jun 22 04:29:54 1999 +0000
+++ b/distrib/utils/sysinst/util.c      Tue Jun 22 06:57:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.44 1999/06/22 02:43:10 cgd Exp $    */
+/*     $NetBSD: util.c,v 1.45 1999/06/22 06:57:01 cgd Exp $    */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -716,7 +716,7 @@
  * show failure_msg and wait for the user to ack it before continuing.
  * success_msg and failure_msg must both be 0-adic messages.
  */
-void
+int
 get_and_unpack_sets(success_msg, failure_msg)
        int success_msg;
        int failure_msg;
@@ -739,14 +739,13 @@
        process_menu(MENU_distmedium);
 
        if (nodist)
-               return;
+               return 1;
 
        if (got_dist) {
 
                /* Extract the distribution, abort on errors. */
-               if (extract_dist()) {
-                       goto bad;
-               }
+               if (extract_dist())
+                       return 1;
 
                /* Configure the system */
                run_makedev();
@@ -765,12 +764,12 @@
                /* Install/Upgrade complete ... reboot or exit to script */
                msg_display(success_msg);
                process_menu(MENU_ok);
-               return;
+               return 0;
        }
 
-bad:
        msg_display(failure_msg);
        process_menu(MENU_ok);
+       return 1;
 }
 
 



Home | Main Index | Thread Index | Old Index