Subject: Installing suggestion
To: None <port-macppc@netbsd.org>
From: Allen Briggs <briggs@wasabisystems.com>
List: port-macppc
Date: 04/22/2003 22:25:22
--+nBD6E3TurpgldQp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I've just been helping someone get a new install on an iBook. When
using pdisk to partition a disk for NetBSD use, it would be useful
to be able to as easily define a NetBSD swap partition as you can
a NetBSD ffs partition. To do this, I think it makes sense to
recognize a "NETBSD_SWAP" partition type.
The patch to do this is attached.
Any thoughts?
-allen
--
Allen Briggs briggs@wasabisystems.com
Wasabi Systems, Inc. http://www.wasabisystems.com/
--+nBD6E3TurpgldQp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diffs
Index: include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/include/disklabel.h,v
retrieving revision 1.10
diff -u -r1.10 disklabel.h
--- include/disklabel.h 2002/09/10 11:28:56 1.10
+++ include/disklabel.h 2003/04/23 02:12:14
@@ -184,6 +184,7 @@
#define PART_TYPE_MAC "APPLE_HFS"
#define PART_TYPE_APPLEUFS "APPLE_UFS"
#define PART_TYPE_NETBSD "NETBSD"
+#define PART_TYPE_NETBSD_SWAP "NETBSD_SWAP"
#define PART_TYPE_NBSD_PPCBOOT "NETBSD/MACPPC"
#define PART_TYPE_NBSD_68KBOOT "NETBSD/MAC68K"
#define PART_TYPE_PATCHES "APPLE_PATCHES"
Index: macppc/disksubr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/macppc/disksubr.c,v
retrieving revision 1.26
diff -u -r1.26 disksubr.c
--- macppc/disksubr.c 2003/04/16 15:01:04 1.26
+++ macppc/disksubr.c 2003/04/23 02:12:14
@@ -209,6 +209,9 @@
*fstype = bzb->bzbType;
else
*fstype = FS_BSDFFS;
+ } else if (strcmp(PART_TYPE_NETBSD_SWAP, typestr) == 0) {
+ type = SWAP_PART;
+ *fstype = FS_SWAP;
} else if (strcmp(PART_TYPE_UNIX, typestr) == 0) {
/* unix part, swap, root, usr */
bzb = (struct blockzeroblock *)(&part->pmBootArgs);
--+nBD6E3TurpgldQp--