Module Name: src
Committed By: tsutsui
Date: Mon Oct 26 14:22:47 UTC 2009
Modified Files:
src/sys/sys: bootblock.h
Log Message:
A boot block on alpha is always little endian, so read and store values
in little endian via le64toh() and htole64() in ALPHA_BOOT_BLOCK_CKSUM().
Fixes installboot(8) (and future endian-aware disklabel(8)) for alpha
on big endian machines.
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/sys/bootblock.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/bootblock.h
diff -u src/sys/sys/bootblock.h:1.47 src/sys/sys/bootblock.h:1.48
--- src/sys/sys/bootblock.h:1.47 Sat Aug 15 00:26:52 2009
+++ src/sys/sys/bootblock.h Mon Oct 26 14:22:47 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bootblock.h,v 1.47 2009/08/15 00:26:52 mishka Exp $ */
+/* $NetBSD: bootblock.h,v 1.48 2009/10/26 14:22:47 tsutsui Exp $ */
/*-
* Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -793,8 +793,8 @@
for (_i = 0; \
_i < (sizeof _bb->bb_data / sizeof _bb->bb_data[0]); \
_i++) \
- _cksum += _bb->bb_data[_i]; \
- *(cksum) = _cksum; \
+ _cksum += le64toh(_bb->bb_data[_i]); \
+ *(cksum) = htole64(_cksum); \
} while (/*CONSTCOND*/ 0)
/* ------------------------------------------