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/arch/pmax Pull up revision 1.34 (...



details:   https://anonhg.NetBSD.org/src/rev/64bb5d542fd5
branches:  netbsd-1-4
changeset: 469616:64bb5d542fd5
user:      he <he%NetBSD.org@localhost>
date:      Wed Oct 20 23:00:37 1999 +0000

description:
Pull up revision 1.34 (requested by simonb):
  During a custom partition layout, don't create an empty /usr
  partition that newfs fails on if / and swap take up the entire disk.

diffstat:

 distrib/utils/sysinst/arch/pmax/md.c |  30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diffs (45 lines):

diff -r 19a416b24da5 -r 64bb5d542fd5 distrib/utils/sysinst/arch/pmax/md.c
--- a/distrib/utils/sysinst/arch/pmax/md.c      Wed Oct 20 22:58:07 1999 +0000
+++ b/distrib/utils/sysinst/arch/pmax/md.c      Wed Oct 20 23:00:37 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.24.2.5 1999/08/08 20:51:00 cgd Exp $  */
+/*     $NetBSD: md.c,v 1.24.2.6 1999/10/20 23:00:37 he Exp $   */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -284,20 +284,22 @@
                
                /* /usr */
                remain = fsdsize - partstart;
-               partsize = fsdsize - partstart;
-               snprintf (isize, 20, "%d", partsize/sizemult);
-               msg_prompt_add (MSG_askfsusr, isize, isize, 20,
+               if (remain > 0) {
+                       partsize = fsdsize - partstart;
+                       snprintf (isize, 20, "%d", partsize/sizemult);
+                       msg_prompt_add (MSG_askfsusr, isize, isize, 20,
                            remain/sizemult, multname);
-               partsize = NUMSEC(atoi(isize),sizemult, dlcylsize);
-               if (remain - partsize < sizemult)
-                       partsize = remain;
-               bsdlabel[PART_USR].pi_fstype = FS_BSDFFS;
-               bsdlabel[PART_USR].pi_offset = partstart;
-               bsdlabel[PART_USR].pi_size = partsize;
-               bsdlabel[PART_USR].pi_bsize = 8192;
-               bsdlabel[PART_USR].pi_fsize = 1024;
-               strcpy (fsmount[PART_USR], "/usr");
-               partstart += partsize;
+                       partsize = NUMSEC(atoi(isize),sizemult, dlcylsize);
+                       if (remain - partsize < sizemult)
+                               partsize = remain;
+                       bsdlabel[PART_USR].pi_fstype = FS_BSDFFS;
+                       bsdlabel[PART_USR].pi_offset = partstart;
+                       bsdlabel[PART_USR].pi_size = partsize;
+                       bsdlabel[PART_USR].pi_bsize = 8192;
+                       bsdlabel[PART_USR].pi_fsize = 1024;
+                       strcpy (fsmount[PART_USR], "/usr");
+                       partstart += partsize;
+               }
 
                /* Others ... */
                remain = fsdsize - partstart;



Home | Main Index | Thread Index | Old Index