Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/disklabel When accessing the MBR magic as a 16-bit valu...
details: https://anonhg.NetBSD.org/src/rev/87a31af0a52c
branches: trunk
changeset: 522248:87a31af0a52c
user: kleink <kleink%NetBSD.org@localhost>
date: Thu Feb 14 00:07:43 2002 +0000
description:
When accessing the MBR magic as a 16-bit value, consider its on-disk
layout would be little-endian, too.
diffstat:
sbin/disklabel/disklabel.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ec28807aee69 -r 87a31af0a52c sbin/disklabel/disklabel.c
--- a/sbin/disklabel/disklabel.c Wed Feb 13 22:06:17 2002 +0000
+++ b/sbin/disklabel/disklabel.c Thu Feb 14 00:07:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.101 2001/12/13 13:52:13 reinoud Exp $ */
+/* $NetBSD: disklabel.c,v 1.102 2002/02/14 00:07:43 kleink Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -47,7 +47,7 @@
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#else
-__RCSID("$NetBSD: disklabel.c,v 1.101 2001/12/13 13:52:13 reinoud Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.102 2002/02/14 00:07:43 kleink Exp $");
#endif
#endif /* not lint */
@@ -663,7 +663,7 @@
*/
/* Check if table is valid. */
mbrmagicp = (u_int16_t *)(&mbr[MBR_MAGICOFF]);
- if (*mbrmagicp != MBR_MAGIC)
+ if (*mbrmagicp != le16toh(MBR_MAGIC))
return (0);
/* Find NetBSD partition. */
for (part = 0; part < NMBRPART; part++) {
Home |
Main Index |
Thread Index |
Old Index