Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/stand/installboot Revert previous again.
details: https://anonhg.NetBSD.org/src/rev/87eea610015f
branches: trunk
changeset: 804108:87eea610015f
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon Nov 24 07:34:45 2014 +0000
description:
Revert previous again.
There are claims that it still violates strict-aliasing rule and
it is no sense to just appease compiler by incorrect implementation.
diffstat:
sys/arch/atari/stand/installboot/installboot.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diffs (32 lines):
diff -r 35588ddd46a9 -r 87eea610015f sys/arch/atari/stand/installboot/installboot.c
--- a/sys/arch/atari/stand/installboot/installboot.c Mon Nov 24 04:06:13 2014 +0000
+++ b/sys/arch/atari/stand/installboot/installboot.c Mon Nov 24 07:34:45 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: installboot.c,v 1.32 2014/11/16 13:47:52 tsutsui Exp $ */
+/* $NetBSD: installboot.c,v 1.33 2014/11/24 07:34:45 tsutsui Exp $ */
/*
* Copyright (c) 1995 Waldi Ravens
@@ -467,10 +467,6 @@
struct disklabel *label, u_int magic)
{
int fd;
- union {
- struct bootblock *bbp;
- uint16_t *word; /* to fill cksum word */
- } bbsec;
memset(bb, 0, sizeof(*bb));
@@ -502,9 +498,8 @@
setIDEpar(bb->bb_xxboot, sizeof(bb->bb_xxboot));
/* set AHDI checksum */
- bbsec.bbp = bb;
- bbsec.word[255] = 0;
- bbsec.word[255] = 0x1234 - abcksum(bb->bb_xxboot);
+ *((u_int16_t *)bb->bb_xxboot + 255) = 0;
+ *((u_int16_t *)bb->bb_xxboot + 255) = 0x1234 - abcksum(bb->bb_xxboot);
if (verbose) {
printf("Primary boot loader: %s\n", xxb);
Home |
Main Index |
Thread Index |
Old Index