Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 2003 18:33:13 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30020 for review
Message-ID:  <200304290133.h3T1XDva088187@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30020

Change 30020 by peter@peter_daintree on 2003/04/28 18:32:56

	Maybe port libdisk to amd64.  Duplicate all the i386 cases and code. <sigh>

Affected files ...

.. //depot/projects/hammer/lib/libdisk/chunk.c#6 edit
.. //depot/projects/hammer/lib/libdisk/create_chunk.c#10 edit
.. //depot/projects/hammer/lib/libdisk/disk.c#10 edit
.. //depot/projects/hammer/lib/libdisk/libdisk.h#6 edit
.. //depot/projects/hammer/lib/libdisk/rules.c#9 edit
.. //depot/projects/hammer/lib/libdisk/write_amd64_disk.c#1 branch

Differences ...

==== //depot/projects/hammer/lib/libdisk/chunk.c#6 (text+ko) ====

@@ -239,6 +239,7 @@
 	/* PLATFORM POLICY BEGIN ------------------------------------- */
 	switch(platform) {
 	case p_i386:
+	case p_amd64:
 		switch (type) {
 		case fat:
 		case mbr:
@@ -317,7 +318,7 @@
 		if (platform == p_sparc64) {
 			offset = Prev_Cyl_Aligned(d, offset);
 			size = Next_Cyl_Aligned(d, size);
-		} else if (platform == p_i386 || platform == p_pc98) {
+		} else if (platform == p_i386 || platform == p_pc98 || platform == p_amd64) {
 			if (type != freebsd)
 				break;
 			if (!(flags & CHUNK_ALIGN))

==== //depot/projects/hammer/lib/libdisk/create_chunk.c#10 (text+ko) ====

@@ -138,7 +138,7 @@
 Fixup_Names(struct disk *d)
 {
 	struct chunk *c1, *c2;
-#if defined(__i386__) || defined(__ia64__)
+#if defined(__i386__) || defined(__ia64__) || defined(__amd64__)
 	struct chunk *c3;
 	int j;
 #endif
@@ -149,7 +149,7 @@
 			continue;
 		if (strcmp(c2->name, "X"))
 			continue;
-#if defined(__i386__) || defined(__ia64__)
+#if defined(__i386__) || defined(__ia64__) || defined(__amd64__)
 		c2->oname = malloc(12);
 		if (!c2->oname)
 			return -1;

==== //depot/projects/hammer/lib/libdisk/disk.c#10 (text+ko) ====

@@ -371,7 +371,7 @@
 #if defined(PC98)
 	printf("  boot1=%p, boot2=%p, bootipl=%p, bootmenu=%p\n",
 		d->boot1, d->boot2, d->bootipl, d->bootmenu);
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__amd64__)
 	printf("  boot1=%p, boot2=%p, bootmgr=%p\n",
 		d->boot1, d->boot2, d->bootmgr);
 #elif defined(__alpha__)
@@ -407,7 +407,7 @@
 	if (d->boot1)
 		free(d->boot1);
 #endif
-#if defined(__i386__)
+#if defined(__i386__) || defined(__amd64__)
 	if (d->boot2)
 		free(d->boot2);
 #endif
@@ -536,7 +536,7 @@
 int
 Set_Boot_Blocks(struct disk *d, const u_char *b1, const u_char *b2)
 {
-#if defined(__i386__)
+#if defined(__i386__) || defined(__amd64__)
 	if (d->boot1)
 		free(d->boot1);
 	d->boot1 = malloc(512);

==== //depot/projects/hammer/lib/libdisk/libdisk.h#6 (text+ko) ====

@@ -27,7 +27,8 @@
 	p_pc98,
 	p_sparc64,
 	p_ia64,
-	p_ppc
+	p_ppc,
+	p_amd64
 } platform =
 #if defined (P_DEBUG)
 	P_DEBUG
@@ -43,6 +44,8 @@
 	p_ia64
 #elif defined(__ppc__)
 	p_ppc
+#elif defined(__amd64__)
+	p_amd64
 #else
 	IHAVENOIDEA
 #endif

==== //depot/projects/hammer/lib/libdisk/rules.c#9 (text+ko) ====

@@ -242,6 +242,7 @@
 
 	switch (platform) {
 	case p_i386:
+	case p_amd64:
 		Rule_000(d, c, msg);
 		Rule_001(d, c, msg);
 		Rule_002(d, c, msg);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304290133.h3T1XDva088187>