Subject: Re: patch, was disklabeling test program
To: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-mac68k
Date: 10/17/1999 17:53:00
Doh!

The disklabeling program I just sent out had some sode which I'd copied
& pasted. But I didn't edit the pased code sufficiently. So the swap and
usr partitions got shoved into the "a" partition rather than the "g" and
"b" partitions respectivly.

Please apply this diff and see how things work.

As noted earlier today, this routine is really only applicable for disks
formatted for NetBSD/mac68k. Right now macppc's install tools use NetBSD
disklabels rather than Apple ones, and this code reads the Apple ones. :-)

Please let me know how it works!

Take care,

Bill

The patch:


From wrstuden@nas.nasa.gov Sun Oct 17 17:47:31 1999
Date: Sun, 17 Oct 1999 04:46:07 -0700 (PDT)
From: Bill Studenmund <wrstuden@nas.nasa.gov>
To: wrstuden@marcy.nas.nasa.gov

--- maclabel.c.orig	Sun Oct 17 17:37:41 1999
+++ maclabel.c	Sun Oct 17 17:38:15 1999
@@ -294,11 +294,11 @@
 	 */
 	if (present_types & (1 << USR_PART)) {
 		setpartition(summary + (part_numbers[USR_PART] - 1),
-				&lp->d_partitions[0], FS_BSDFFS);
+				&lp->d_partitions[6], FS_BSDFFS);
 		maxslot = 6;
 	} else if (present_types & (1 << AUX_USR_PART)) {
 		setpartition(summary + (part_numbers[AUX_USR_PART] - 1),
-				&lp->d_partitions[0], FS_BSDFFS);
+				&lp->d_partitions[6], FS_BSDFFS);
 		maxslot = 6;
 	}
 
@@ -307,7 +307,7 @@
 	 */
 	if (present_types & (1 << SWAP_PART))
 		setpartition(summary + (part_numbers[SWAP_PART] - 1),
-				&lp->d_partitions[0], FS_SWAP);
+				&lp->d_partitions[1], FS_SWAP);
 
 	/*
 	 * Now go through the other partitions & fill them in.