PERFORCE change 30669 for review

Robert Watson rwatson at FreeBSD.org
Tue May 6 15:59:29 GMT 2003


http://perforce.freebsd.org/chv.cgi?CH=30669

Change 30669 by rwatson at rwatson_tislabs on 2003/05/06 08:58:38

	Revert local big boot block changes; no longer required to boot
	UFS2.

Affected files ...

.. //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/disks.c#14 edit

Differences ...

==== //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/disks.c#14 (text+ko) ====

@@ -832,12 +832,6 @@
 diskPartitionWrite(dialogMenuItem *self)
 {
     Device **devs;
-#ifdef __i386__
-    size_t boot1size, boot2size;
-    Chunk *slice;
-    PartInfo *pi;
-    int bigbb, nonbigbb;
-#endif
     int i;
 
     if (!variable_cmp(DISK_PARTITIONED, "written"))
@@ -860,60 +854,7 @@
 	if (!devs[i]->enabled)
 	    continue;
 
-#ifdef __i386__
-	/*
-	 * For i386, use "big" boot blocks if the first partition in
-	 * every FreeBSD slice is UFS2 and therefore has 64KB of space
-	 * available rather than UFS1's mere 8KB.  We could be more
-	 * intelligent here and move forward uncreated non-UFS2
-	 * partitions to accomodate, and check that already-created
-	 * slice aren't actually created with an offset from the
-	 * beginning of their slice in the first place.
-	 */
-	nonbigbb = bigbb = 0;
-	for (slice = d->chunks->part; slice; slice = slice->next) {
-	    if (slice->type != freebsd)
-		continue;
-	    if (slice->part->type == unused)
-		continue;	/* just an empty FreeBSD slice */
-	    if (slice->part->subtype != FS_BSDFFS) {
-		nonbigbb = 1;	/* assume non-UFS2 means non-64KB */
-		continue;
-	    }
-	    pi = slice->part->private_data;
-	    if (pi == NULL || pi->newfs_type != NEWFS_UFS ||
-	      !pi->newfs_data.newfs_ufs.ufs2) {
-		nonbigbb = 1;	/* assume non-UFS2 means non-64KB */
-		continue;
-	    }
-	    bigbb = 1;
-	}
-	if (bigbb && nonbigbb)
-	    msgConfirm("Warning: Some FreeBSD slices on this disk preclude the "
-		       "installation of UFS2-capable boot blocks.  You will need "
-		       "to manually use disklabel(8) on these slices to install "
-		       "the correct boot blocks.");
-	/*
-	 * Boot blocks may switch back and forth if the installer is
-	 * writing out labels on multiple disks.
-	 */
-	free(boot1);
-	free(boot2);
-	if (!nonbigbb && bigbb) {
-	    boot1 = bootalloc("boot1", &boot1size);
-	    boot2 = bootalloc("boot2", &boot2size);
-	    Set_Boot_Block_Size(d, 0x10000);
-	    if (Set_Large_Boot_Blocks(d, boot1, boot1size, boot2,
-	      boot2size)) {
-	        msgConfirm("ERROR: Unable to use boot blocks on disk %s!", d->name);
-	        return DITEM_FAILURE;
-	    }
-	} else {
-	    boot1 = bootalloc("boot1", &boot1size);
-	    boot2 = bootalloc("boot2-ufs1", &boot2size);
-	    Set_Boot_Blocks(d, boot1, boot2);
-	}
-#elif defined(__ia64__)
+#if defined(__i386__) || defined(__ia64__)
 	if (!boot1) boot1 = bootalloc("boot1", NULL);
 	if (!boot2) boot2 = bootalloc("boot2", NULL);
 	Set_Boot_Blocks(d, boot1, boot2);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list