Handle MBRs for x86_64.

This commit is contained in:
fvdl 2002-12-11 14:28:46 +00:00
parent d182cf2f90
commit 53d30b7a60
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.44 2002/07/28 15:17:38 manu Exp $
# $NetBSD: Makefile,v 1.45 2002/12/11 14:28:46 fvdl Exp $
# @(#)Makefile 8.2 (Berkeley) 3/17/94
PROG= disklabel
@ -7,7 +7,7 @@ MAN= disklabel.5 disklabel.8
LDADD+= -lutil
DPADD+= ${LIBUTIL}
.if (${MACHINE} == "i386")
.if (${MACHINE} == "i386" || ${MACHINE} == "x86_64")
# recognize old partition ID for a while
CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
# use MBR partition info

View File

@ -1,4 +1,4 @@
/* $NetBSD: disklabel.c,v 1.109 2002/12/05 22:59:25 jonb Exp $ */
/* $NetBSD: disklabel.c,v 1.110 2002/12/11 14:28:46 fvdl Exp $ */
/*
* Copyright (c) 1987, 1993
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#else
__RCSID("$NetBSD: disklabel.c,v 1.109 2002/12/05 22:59:25 jonb Exp $");
__RCSID("$NetBSD: disklabel.c,v 1.110 2002/12/11 14:28:46 fvdl Exp $");
#endif
#endif /* not lint */
@ -657,7 +657,7 @@ readmbr(int f)
return (0);
}
#if !defined(__i386__)
#if !defined(__i386__) && !defined(__x86_64__)
/* avoid alignment error */
memcpy(mbr, &mbr[MBR_PARTOFF], NMBRPART * sizeof(*dp));
dp = (struct mbr_partition *)mbr;