Attempt to fix my breakage of the alpha makebootarea() in rev.1.19.
The previous attempt just converted compile time breakage to runtime breakage.
This commit is contained in:
parent
cfe8b629f1
commit
21c729c287
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38483
@ -46,7 +46,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94";
|
|||||||
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: disklabel.c,v 1.19 1998/08/17 21:13:57 bde Exp $";
|
"$Id: disklabel.c,v 1.20 1998/08/21 23:44:16 gpalmer Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -548,6 +548,7 @@ makebootarea(boot, dp, f)
|
|||||||
register struct disklabel *dp;
|
register struct disklabel *dp;
|
||||||
int f;
|
int f;
|
||||||
{
|
{
|
||||||
|
struct disklabel *lp;
|
||||||
register char *p;
|
register char *p;
|
||||||
int b;
|
int b;
|
||||||
#if NUMBOOT > 0
|
#if NUMBOOT > 0
|
||||||
@ -555,11 +556,10 @@ makebootarea(boot, dp, f)
|
|||||||
struct stat sb;
|
struct stat sb;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __alpha__
|
#ifdef __alpha__
|
||||||
u_long *lp;
|
u_long *bootinfo;
|
||||||
int n;
|
int n;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
struct disklabel *lp;
|
|
||||||
char *tmpbuf;
|
char *tmpbuf;
|
||||||
int i, found;
|
int i, found;
|
||||||
#endif
|
#endif
|
||||||
@ -690,10 +690,10 @@ makebootarea(boot, dp, f)
|
|||||||
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
|
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
err(4, "%s", xxboot);
|
err(4, "%s", xxboot);
|
||||||
lp = (u_long *) (boot + 480);
|
bootinfo = (u_long *)(boot + 480);
|
||||||
lp[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
|
bootinfo[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
|
||||||
lp[1] = 1; /* start at sector 1 */
|
bootinfo[1] = 1; /* start at sector 1 */
|
||||||
lp[2] = 0; /* flags (must be zero) */
|
bootinfo[2] = 0; /* flags (must be zero) */
|
||||||
#else /* !__alpha__ */
|
#else /* !__alpha__ */
|
||||||
if (read(b, boot, (int)dp->d_bbsize) < 0)
|
if (read(b, boot, (int)dp->d_bbsize) < 0)
|
||||||
err(4, "%s", xxboot);
|
err(4, "%s", xxboot);
|
||||||
|
@ -46,7 +46,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94";
|
|||||||
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: disklabel.c,v 1.19 1998/08/17 21:13:57 bde Exp $";
|
"$Id: disklabel.c,v 1.20 1998/08/21 23:44:16 gpalmer Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -548,6 +548,7 @@ makebootarea(boot, dp, f)
|
|||||||
register struct disklabel *dp;
|
register struct disklabel *dp;
|
||||||
int f;
|
int f;
|
||||||
{
|
{
|
||||||
|
struct disklabel *lp;
|
||||||
register char *p;
|
register char *p;
|
||||||
int b;
|
int b;
|
||||||
#if NUMBOOT > 0
|
#if NUMBOOT > 0
|
||||||
@ -555,11 +556,10 @@ makebootarea(boot, dp, f)
|
|||||||
struct stat sb;
|
struct stat sb;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __alpha__
|
#ifdef __alpha__
|
||||||
u_long *lp;
|
u_long *bootinfo;
|
||||||
int n;
|
int n;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
struct disklabel *lp;
|
|
||||||
char *tmpbuf;
|
char *tmpbuf;
|
||||||
int i, found;
|
int i, found;
|
||||||
#endif
|
#endif
|
||||||
@ -690,10 +690,10 @@ makebootarea(boot, dp, f)
|
|||||||
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
|
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
err(4, "%s", xxboot);
|
err(4, "%s", xxboot);
|
||||||
lp = (u_long *) (boot + 480);
|
bootinfo = (u_long *)(boot + 480);
|
||||||
lp[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
|
bootinfo[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
|
||||||
lp[1] = 1; /* start at sector 1 */
|
bootinfo[1] = 1; /* start at sector 1 */
|
||||||
lp[2] = 0; /* flags (must be zero) */
|
bootinfo[2] = 0; /* flags (must be zero) */
|
||||||
#else /* !__alpha__ */
|
#else /* !__alpha__ */
|
||||||
if (read(b, boot, (int)dp->d_bbsize) < 0)
|
if (read(b, boot, (int)dp->d_bbsize) < 0)
|
||||||
err(4, "%s", xxboot);
|
err(4, "%s", xxboot);
|
||||||
|
Loading…
Reference in New Issue
Block a user