Module Name: src
Committed By: christos
Date: Thu Nov 13 16:02:25 UTC 2014
Modified Files:
src/usr.sbin/installboot/arch: vax.c
Log Message:
Use VAX_LABELOFFSET here; It needs to be the machine-specific one. Thanks
to gcc-4.8 for discovering the bug and to Atari for having a LABELOFFSET of
516 > 512 :-)
XXX: Perhaps we should put all those constants in <sys/bootblock.h> instead
of spreading them around.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/installboot/arch/vax.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/installboot/arch/vax.c
diff -u src/usr.sbin/installboot/arch/vax.c:1.17 src/usr.sbin/installboot/arch/vax.c:1.18
--- src/usr.sbin/installboot/arch/vax.c:1.17 Sun Jun 16 15:05:00 2013
+++ src/usr.sbin/installboot/arch/vax.c Thu Nov 13 11:02:25 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: vax.c,v 1.17 2013/06/16 19:05:00 martin Exp $ */
+/* $NetBSD: vax.c,v 1.18 2014/11/13 16:02:25 christos Exp $ */
/*-
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#include <sys/cdefs.h>
#if !defined(__lint)
-__RCSID("$NetBSD: vax.c,v 1.17 2013/06/16 19:05:00 martin Exp $");
+__RCSID("$NetBSD: vax.c,v 1.18 2014/11/13 16:02:25 christos Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -88,6 +88,8 @@ __RCSID("$NetBSD: vax.c,v 1.17 2013/06/1
#include "installboot.h"
+#define VAX_LABELOFFSET 64
+
#ifndef __CTASSERT
#define __CTASSERT(X)
#endif
@@ -210,12 +212,12 @@ vax_setboot(ib_params *params)
/*
* Copy disklabel from old boot block to new.
- * Assume everything between LABELOFFSET and the start of
+ * Assume everything between VAX_LABELOFFSET and the start of
* the param block is scratch area and can be copied over.
*/
- memcpy(bootstrapbuf+LABELOFFSET,
- oldbb+LABELOFFSET,
- offsetof(struct vax_boot_block,bb_magic1)-LABELOFFSET);
+ memcpy(bootstrapbuf + VAX_LABELOFFSET,
+ oldbb + VAX_LABELOFFSET,
+ offsetof(struct vax_boot_block,bb_magic1) - VAX_LABELOFFSET);
/* point to bootblock at begining of bootstrap */
bb = (struct vax_boot_block*)bootstrapbuf;