summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-23 07:32:37 +0000
committerbde <bde@FreeBSD.org>1998-08-23 07:32:37 +0000
commit7a7aef0b8578f3aed32bb3ba014c25e9c2393f99 (patch)
tree0e411655b7d9caa484486f397ecb15d55b41064e /sbin
parenta76fb5eefabdc9418c911bf0b61768d533c15cbd (diff)
downloadFreeBSD-src-7a7aef0b8578f3aed32bb3ba014c25e9c2393f99.zip
FreeBSD-src-7a7aef0b8578f3aed32bb3ba014c25e9c2393f99.tar.gz
Attempt to fix my breakage of the alpha makebootarea() in rev.1.19.
The previous attempt just converted compile time breakage to runtime breakage.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/bsdlabel/bsdlabel.c14
-rw-r--r--sbin/disklabel/disklabel.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 9f48711..be60d54 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -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"; */
#endif
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 */
#include <sys/param.h>
@@ -548,6 +548,7 @@ makebootarea(boot, dp, f)
register struct disklabel *dp;
int f;
{
+ struct disklabel *lp;
register char *p;
int b;
#if NUMBOOT > 0
@@ -555,11 +556,10 @@ makebootarea(boot, dp, f)
struct stat sb;
#endif
#ifdef __alpha__
- u_long *lp;
+ u_long *bootinfo;
int n;
#endif
#ifdef __i386__
- struct disklabel *lp;
char *tmpbuf;
int i, found;
#endif
@@ -690,10 +690,10 @@ makebootarea(boot, dp, f)
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
if (n < 0)
err(4, "%s", xxboot);
- lp = (u_long *) (boot + 480);
- lp[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
- lp[1] = 1; /* start at sector 1 */
- lp[2] = 0; /* flags (must be zero) */
+ bootinfo = (u_long *)(boot + 480);
+ bootinfo[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
+ bootinfo[1] = 1; /* start at sector 1 */
+ bootinfo[2] = 0; /* flags (must be zero) */
#else /* !__alpha__ */
if (read(b, boot, (int)dp->d_bbsize) < 0)
err(4, "%s", xxboot);
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 9f48711..be60d54 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -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"; */
#endif
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 */
#include <sys/param.h>
@@ -548,6 +548,7 @@ makebootarea(boot, dp, f)
register struct disklabel *dp;
int f;
{
+ struct disklabel *lp;
register char *p;
int b;
#if NUMBOOT > 0
@@ -555,11 +556,10 @@ makebootarea(boot, dp, f)
struct stat sb;
#endif
#ifdef __alpha__
- u_long *lp;
+ u_long *bootinfo;
int n;
#endif
#ifdef __i386__
- struct disklabel *lp;
char *tmpbuf;
int i, found;
#endif
@@ -690,10 +690,10 @@ makebootarea(boot, dp, f)
n = read(b, boot + dp->d_secsize, (int)dp->d_bbsize);
if (n < 0)
err(4, "%s", xxboot);
- lp = (u_long *) (boot + 480);
- lp[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
- lp[1] = 1; /* start at sector 1 */
- lp[2] = 0; /* flags (must be zero) */
+ bootinfo = (u_long *)(boot + 480);
+ bootinfo[0] = (n + dp->d_secsize - 1) / dp->d_secsize;
+ bootinfo[1] = 1; /* start at sector 1 */
+ bootinfo[2] = 0; /* flags (must be zero) */
#else /* !__alpha__ */
if (read(b, boot, (int)dp->d_bbsize) < 0)
err(4, "%s", xxboot);
OpenPOWER on IntegriCloud