NetBSD/sys/sys
lukem 455da8e60b Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to
leave 4 bytes for the Windows NT Drive Serial Number (DSN) at 440-443
(as mbr_sector.mbr_dsn).

Ensure that all the MBR & PBR code reserves space for mbr_sector.mbr_dsn.

Leave the bootsel magic number at 444-445 as mbr_sector.mbr_bootsel_magic
(instead of mbr_sector.mbr_bootsel.mbrbs_magic), but use 0xb5e1 (MBR_BS_MAGIC)
instead of 0xaa55 (MBR_MAGIC) to indicate that this change has occurred.

Rework MBR_BS_NEWMBR to mean "mbr_bootsel has moved to 400".

Modify fdisk(8) to automatically relocate the mbr_bootsel from 404 to 400
if mbr_bootsel_magic is the old value (0xaa55), and unset MBR_BS_NEWMBR
to flag that new mbr_bootsel code must be used if updating the MBR.


These changes fixes a problem where Windows 2000 or Windows XP would corrupt
the last 3 bytes + NUL of MBR partition 3's bootsel name if the bootsel name
was 5 characters long, replacing bytes 6-9 with the DSN.
Also, by explicitly reserving the space for the DSN we prevent problems in the
future if non bootsel MBR or PBR code had other information at bytes 440-443.
2004-03-22 07:11:00 +00:00
..
acct.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
agpio.h
ansi.h
ataio.h
audioio.h
boot_flag.h Add two new boot flags: 2003-11-03 16:39:07 +00:00
bootblock.h Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to 2004-03-22 07:11:00 +00:00
bswap.h
buf.h change the way to handle NEW_BUFQ_STRATEGY option. 2004-02-28 06:28:47 +00:00
callout.h Make callout_setfunc() a CPP macro. Suggested by enami. 2003-10-30 04:32:56 +00:00
cdefs_aout.h Add a.out weak-symbol support (new in binutils 2.14). 2003-12-07 12:58:56 +00:00
cdefs_elf.h ; -> \n\t in a few more places. Fixes problems with HPPA, where ; is the 2003-10-29 21:56:02 +00:00
cdefs.h Add a __insn_barrier() macro to stop the optimizer from moving code 2004-01-07 19:38:10 +00:00
cdio.h
chio.h
clockctl.h - Protect clockctl.h consistently with the correct ifdef. 2003-09-30 20:38:38 +00:00
conf.h Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:06:48 +00:00
core.h
device.h www.netbsd.org -> www.NetBSD.org 2003-11-17 10:07:58 +00:00
dir.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
dirent.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
disk.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
disklabel_acorn.h
disklabel.h Revert previous; it is not the correct solution to the problem of 2003-11-14 12:07:42 +00:00
dkbad.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
dkio.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
dkstat.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
domain.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
dvdio.h
endian.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
envsys.h
errno.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
event.h add internal kernel NOTE_SUBMIT; this will be used by some kqueue code 2004-02-22 17:45:26 +00:00
eventvar.h
exec_aout.h Reshuffle MIDs value so that conflicts with binutils are avoided and 2004-02-11 01:03:35 +00:00
exec_coff.h - Add execsw es_setup_stack 2003-08-08 18:54:16 +00:00
exec_ecoff.h - Add execsw es_setup_stack 2003-08-08 18:54:16 +00:00
exec_elf.h Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
exec_macho.h Support Darwin static binaries (I should say: support the only Darwin 2003-10-19 07:52:22 +00:00
exec_script.h Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
exec.h Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
extent.h
fcntl.h Add F_CLOSEM, F_MAXFD. 2004-01-05 00:35:53 +00:00
fdio.h
featuretest.h NetBSD.ORG -> NetBSD.org 2003-12-04 12:42:54 +00:00
file.h - pass signo to fownsignal [ok by jd] 2003-09-22 12:59:55 +00:00
filedesc.h use a two-level bitmap as suggested by mogul and banga for fdalloc; 2003-10-30 07:27:02 +00:00
filio.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
float_ieee754.h Add a note how this file is to be used. 2003-10-26 16:44:20 +00:00
gmon.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
hash.h
ieee754.h Use "#if" to compare two tokens, not "#ifdef". 2003-10-27 02:30:26 +00:00
inttypes.h
ioccom.h parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
ioctl_compat.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ioctl.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ipc.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
kcont.h Fix typos in comments. 2004-03-20 02:58:47 +00:00
kcore.h
kernel.h define symbols also if _STANDALONE because arc4random needs mono_time. This 2003-10-02 12:14:00 +00:00
kgdb.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
kprintf.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ksem.h Don't make declarations visible from userland, unless _LIBC is defined, 2003-09-30 20:37:36 +00:00
ksyms.h o Fix a bug in ksyms that changed the real meaning of st_name entries for 2003-11-17 10:16:18 +00:00
kthread.h
ktrace.h Make ktrwrite() and ktrinitheader() private again. ktrsyscall32() no longer 2004-02-25 21:34:18 +00:00
lkm.h Since rev. 1.29, lkmdispatch is called before the LKM's load function. 2004-02-06 22:40:37 +00:00
localedef.h
lock.h there's no need to initialize simplelock on uniprocessor. 2004-01-14 11:34:48 +00:00
lockf.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
lwp.h add kernel part of concurrency support for SA on MP systems 2004-03-14 01:08:47 +00:00
Makefile uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
malloc.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
mallocvar.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
mbuf.h Split MCLGET macro to be able to support multiple M_CLUSTER sizes. 2004-02-10 01:33:26 +00:00
md4.h NetBSD.ORG -> NetBSD.org 2003-12-04 12:42:54 +00:00
md5.h NetBSD.ORG -> NetBSD.org 2003-12-04 12:42:54 +00:00
midiio.h netbsd.org -> NetBSD.org 2003-12-04 13:57:30 +00:00
mman.h Add a MAP_WIRED flag to mmap(2), which causes the new mapping to be 2003-10-07 00:17:09 +00:00
mount.h Dynamic sysctl. 2003-12-04 19:38:21 +00:00
msg.h Add a new feature-test macro, _NETBSD_SOURCE. If this is defined 2003-04-28 23:16:11 +00:00
msgbuf.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
mtio.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
namei.h PR/15397: Jason Thorpe: directory operations on pathnames that refer to 2003-09-11 17:33:42 +00:00
null.h Update comment after the #endif for recent change. 2003-10-24 21:45:09 +00:00
param.h Add a generic copy-on-write hook to add/remove functions that will be 2004-02-14 00:00:56 +00:00
pipe.h
pmc.h
poll.h Add a new feature-test macro, _NETBSD_SOURCE. If this is defined 2003-04-28 23:16:11 +00:00
pool.h Add a new pool initialization flag, PR_IMMEDRELEASE. This flag causes 2004-01-09 19:00:16 +00:00
power.h Add a "reset button" type. 2003-04-20 20:48:27 +00:00
proc.h Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
properties.h prototypes must not have variable name 2003-07-04 07:42:04 +00:00
protosw.h Dynamic sysctl. 2003-12-04 19:38:21 +00:00
ptrace.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
queue.h Fix pasto, from when STAILQ* was added. Closes PR 24557 by Ron Roskens. 2004-02-26 01:20:47 +00:00
radioio.h
ras.h Add new macros: 2004-03-03 21:05:30 +00:00
reboot.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
resource.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
resourcevar.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
rnd.h
sa.h kernel part of no-syscall upcall stack return: libpthread registers 2004-01-02 18:52:17 +00:00
savar.h add kernel part of concurrency support for SA on MP systems 2004-03-14 01:08:47 +00:00
scanio.h
sched.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
scsiio.h
select.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
sem.h Back out the lwp/ktrace changes. They contained a lot of colateral damage, 2003-06-29 22:28:00 +00:00
sha1.h prototype must not have variable name 2003-07-08 06:17:59 +00:00
shm.h Need to make sure __sysconf() has C linkage. 2003-10-20 22:16:33 +00:00
siginfo.h PR/23997: Love: <sys/siginfo.h> pollutes userland namespace with <sys/queue.h> 2004-01-06 12:41:43 +00:00
signal.h Per 1003.1-2001 XSI, make available ucontext_t (via <sys/ucontext.h>). 2003-09-13 14:45:44 +00:00
signalvar.h Gah, ksiginfo_t isn't actually exported to userland, so use 2003-10-25 20:12:19 +00:00
sigtypes.h Define a few 32bit compat types (if COMPAT_NETBSD32, not exported to 2003-10-13 18:50:43 +00:00
socket.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
socketvar.h remove per-socket pendfree list. 2004-03-17 09:58:15 +00:00
sockio.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
stat.h Compact previous a little, making better use of _NETBSD_SOURCE. 2003-11-04 00:00:36 +00:00
stdint.h
swap.h
syscall.h regen after: 2004-03-14 00:47:25 +00:00
syscallargs.h regen after: 2004-03-14 00:47:25 +00:00
sysctl.h Add PTRTOUINT64() and UINT64TOPTR() macros to sys/sysctl.h for use by 2004-02-19 03:56:30 +00:00
syslimits.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
syslog.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
systm.h Fix NTP PPSAPI support (enabled with "options PPS_SYNC"): 2004-01-23 05:01:19 +00:00
systrace.h Don't pass the (unused) return value args to the 2003-10-31 03:28:12 +00:00
tablet.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
termios.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
time.h SA_SIGINFO changes. This is 1.5Z 2003-09-06 22:01:20 +00:00
timeb.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
timepps.h Fix NTP PPSAPI support (enabled with "options PPS_SYNC"): 2004-01-23 05:01:19 +00:00
times.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
timex.h
tprintf.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
trace.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
tree.h s/red-back/red-black/ inside a comment 2004-01-24 21:59:47 +00:00
tty.h Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
ttychars.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ttycom.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ttydefaults.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ttydev.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
types.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
ucontext.h Define a few 32bit compat types (if COMPAT_NETBSD32, not exported to 2003-10-13 18:50:43 +00:00
ucred.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
uio.h PR# standards/16143: hide struct uio from userland behind a __UIO_EXPOSE 2003-09-13 16:59:29 +00:00
un.h Restore a change that made AF_LOCAL sockets block on connect(2) until 2003-11-29 10:02:42 +00:00
unistd.h Kernel portion of the fsync_range(2) system call. Written by Bill 2003-11-15 01:19:38 +00:00
unpcb.h Restore a change that made AF_LOCAL sockets block on connect(2) until 2003-11-29 10:02:42 +00:00
user.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
userconf.h
userret.h kernel part of no-syscall upcall stack return: libpthread registers 2004-01-02 18:52:17 +00:00
utsname.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
uuid.h uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in 2004-01-29 02:00:02 +00:00
vadvise.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
verified_exec.h prototype must not carry variable name 2003-07-08 06:49:19 +00:00
vmmeter.h Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 16:26:28 +00:00
vnode_if.h Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:06:48 +00:00
vnode.h Add a generic copy-on-write hook to add/remove functions that will be 2004-02-14 00:00:56 +00:00
wait.h correctly define _W_INT ifdef _KERNEL 2003-09-20 14:59:56 +00:00
wdog.h