Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/sysinst Make sure to get the magic MBR number ...



details:   https://anonhg.NetBSD.org/src/rev/2c23900014b3
branches:  trunk
changeset: 471523:2c23900014b3
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sat Apr 03 22:56:22 1999 +0000

description:
Make sure to get the magic MBR number right (i.e. use u_int16_t).

diffstat:

 distrib/utils/sysinst/mbr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r b15ec90644dd -r 2c23900014b3 distrib/utils/sysinst/mbr.c
--- a/distrib/utils/sysinst/mbr.c       Sat Apr 03 19:03:02 1999 +0000
+++ b/distrib/utils/sysinst/mbr.c       Sat Apr 03 22:56:22 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr.c,v 1.11 1999/04/01 11:33:02 fvdl Exp $ */
+/*     $NetBSD: mbr.c,v 1.12 1999/04/03 22:56:22 fvdl Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -451,9 +451,9 @@
 valid_mbr(buf)
        char *buf;
 {
-       int magic;
+       u_int16_t magic;
 
-       magic = *((int *)&buf[MBR_MAGICOFF]);
+       magic = *((u_int16_t *)&buf[MBR_MAGICOFF]);
 
        return (le_to_native16(magic) == MBR_MAGIC);
 }



Home | Main Index | Thread Index | Old Index