summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/disk.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-04-30 21:03:16 +0000
committerpeter <peter@FreeBSD.org>2003-04-30 21:03:16 +0000
commit75662965c88e08c2d07c456c641688450362da80 (patch)
treec2d46f9e7237fa254b5ecebcecfa51b7655e8e66 /lib/libdisk/disk.c
parent409ee51dc226a370f2407a87479bd9a900419dbe (diff)
downloadFreeBSD-src-75662965c88e08c2d07c456c641688450362da80.zip
FreeBSD-src-75662965c88e08c2d07c456c641688450362da80.tar.gz
Teach libdisk that AMD64 works just like i386
Diffstat (limited to 'lib/libdisk/disk.c')
-rw-r--r--lib/libdisk/disk.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
index 9b013a39..c750c2b 100644
--- a/lib/libdisk/disk.c
+++ b/lib/libdisk/disk.c
@@ -56,6 +56,8 @@ const enum platform platform =
p_ia64
#elif defined(__ppc__)
p_ppc
+#elif defined(__amd64__)
+ p_amd64
#else
IHAVENOIDEA
#endif
@@ -391,7 +393,7 @@ Debug_Disk(struct disk *d)
#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__)
@@ -427,7 +429,7 @@ Free_Disk(struct disk *d)
if (d->boot1)
free(d->boot1);
#endif
-#if defined(__i386__)
+#if defined(__i386__) || defined(__amd64__)
if (d->boot2)
free(d->boot2);
#endif
@@ -556,7 +558,7 @@ Set_Boot_Mgr(struct disk *d, const u_char *b, const size_t s)
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);
OpenPOWER on IntegriCloud