Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/installboot/arch Use VAX_LABELOFFSET here; It needs...
details: https://anonhg.NetBSD.org/src/rev/e66829afdd67
branches: trunk
changeset: 333675:e66829afdd67
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 13 16:02:25 2014 +0000
description:
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.
diffstat:
usr.sbin/installboot/arch/vax.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 15b00324df34 -r e66829afdd67 usr.sbin/installboot/arch/vax.c
--- a/usr.sbin/installboot/arch/vax.c Thu Nov 13 15:25:48 2014 +0000
+++ b/usr.sbin/installboot/arch/vax.c Thu Nov 13 16:02:25 2014 +0000
@@ -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 @@
#include "installboot.h"
+#define VAX_LABELOFFSET 64
+
#ifndef __CTASSERT
#define __CTASSERT(X)
#endif
@@ -210,12 +212,12 @@
/*
* 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;
Home |
Main Index |
Thread Index |
Old Index