NetBSD-Bugs archive

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

Re: kern/42573: DIRBLKSIZ in <ufs/ufs/dir.h> should not beDEV_BSIZE constant

The following reply was made to PR kern/42573; it has been noted by GNATS.

From: David Laight <>
Subject: Re: kern/42573: DIRBLKSIZ in <ufs/ufs/dir.h> should not beDEV_BSIZE 
Date: Sun, 3 Jan 2010 19:51:20 +0000

 On Mon, Jan 04, 2010 at 03:51:19AM +0900, Izumi Tsutsui wrote:
 > >  But to make everything fit (eg i386 boot code) the byte alignments
 > >  cannot change - the label has to remain in bytes 512-1203.
 > Does it? What about "LABELSECTOR" in <machine/disklabel.h>?
 LABELSECTOR needs to go.
 > Shouldn't sys/arch/i386/stand/mbr/mbr.S be sector size aware?
 I think that code is safe - even though it will read rather more data
 than expected.
 What happens later on is a bigger problem.
 > >  (I have a USB memory stick with 2k sectors, the 0x55, 0xaa are in
 > >  bytes 510 and 511 as usual.)
 > Magic should be at MBR_MAGIC_OFFSET defined in <sys/bootblock.h>
 > so it doesn't matter of sector size, does it?
 No - NetBSD doesn't have control over the mbr layout.
 We have to match what (probably) microsoft does.
 David Laight:

Home | Main Index | Thread Index | Old Index