NetBSD/sbin
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
..
atactl It's extension, not extention. From Miod Vallat (miod at online fr). 2004-03-14 20:11:24 +00:00
badsect When searching for the superblock, check that the fs_sblockloc field 2004-03-21 19:13:59 +00:00
bim Fix "variable shadows global declaration" warnings. 2003-11-12 06:45:14 +00:00
brconfig realloc pedant 2003-09-19 08:35:15 +00:00
ccdconfig Support CCDF_NOLABEL. Document what CCDF_UNIFORM actually does. 2003-10-17 05:23:56 +00:00
cgdconfig Drop trailing whitespace; new sentence, new line. 2004-03-17 01:40:34 +00:00
chkconfig Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
clri When searching for the superblock, check that the fs_sblockloc field 2004-03-21 19:35:23 +00:00
disklabel Single-letter options do not need a line each; add more 2004-03-20 18:51:06 +00:00
dkctl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
dmesg Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
dump When searching for the superblock, don't pick an ffsv1 superblock from the 2004-03-21 20:30:38 +00:00
dump_lfs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
edlabel use snprintf 2003-05-17 23:10:57 +00:00
fastboot Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:11 +00:00
fdisk Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to 2004-03-22 07:11:00 +00:00
fsck Remove my license. 2004-03-20 20:28:44 +00:00
fsck_ext2fs Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
fsck_ffs Don't use an ffsv1 superblock from 64k (SBLOCK_UFS2) when looking 2004-03-21 20:01:41 +00:00
fsck_lfs change KES license to standard NetBSD license 2004-03-20 22:31:13 +00:00
fsck_msdos Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
fsdb Standardize flags display in usage. 2004-01-04 00:13:00 +00:00
fsirand Don't use 1st alternate superblock at offset 64k for ffsv1. 2004-03-21 20:12:16 +00:00
ifconfig Add an article. 2004-03-01 00:19:06 +00:00
init veriexec can't be changed at securelevel 1 2004-02-19 13:24:31 +00:00
ldconfig Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
lmcctl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
mbrlabel Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
mknod Don't exit on error from pack_dev.c, but return an error string and 2004-01-30 19:06:55 +00:00
modload Remove superfluous TRUE and FALSE definitions. 2004-03-19 12:04:37 +00:00
modunload New sentence, new line; drop trailing whitespace. 2003-09-06 20:12:41 +00:00
mount realloc pedant 2003-09-19 08:29:58 +00:00
mount_ados print masks and modes in octal. 2003-05-03 15:37:07 +00:00
mount_cd9660 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_ext2fs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_fdesc Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_ffs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_filecore Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_kernfs add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8). 2003-09-08 06:51:53 +00:00
mount_lfs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_msdos Remove extra newline from usage message. 2004-01-05 23:27:16 +00:00
mount_nfs uppercase NFS acronym 2004-01-15 03:33:20 +00:00
mount_ntfs g/c all traces of FreeBSD-specific code - it only obfuscated the code without 2003-08-02 10:11:47 +00:00
mount_null Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_overlay Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_portal unifdef -DINET6. getaddrinfo will always be there, so there's no point in 2004-03-01 23:01:18 +00:00
mount_procfs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_smbfs install the example dot.nsmbrc 2003-04-04 07:50:43 +00:00
mount_umap Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
mount_union Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
newbtconf Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
newfs Speed up mkfs of ffsv1 by writing inodes more than 8k at a time. 2004-03-18 20:35:55 +00:00
newfs_lfs remove definitions for ffs, which don't belong here. 2003-12-17 05:08:43 +00:00
newfs_msdos Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
nologin Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
pdisk remove workaround for missing errno.h include 2002-08-22 22:38:05 +00:00
ping do not disclose endianness/sizeof(long) on probe packet. idea from openbsd 2004-01-26 02:21:30 +00:00
ping6 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'. 2003-09-07 16:22:20 +00:00
pppoectl Spell length with h after t. Inspired by a commit by brad@openbsd. 2004-02-13 18:02:05 +00:00
raidctl Note in the description of hot-adding components that a component label is 2004-02-29 22:22:35 +00:00
rcorder Move Matt Green's code from a 4-clause to a 3-clause licence by removing 2003-10-13 14:22:20 +00:00
reboot Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
resize_ffs Dunno why this code is playing 'hunt the superblock', but stop it 2004-03-21 21:02:01 +00:00
restore Fix byteswapping a direntry. From Wolfgang Solfrank. 2003-11-05 22:27:16 +00:00
rndctl strlcat 2003-07-13 07:59:24 +00:00
route Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
routed Initialize an uninitialized variable. 2003-11-14 01:31:24 +00:00
rtsol rtsol: factor out dump.c if -DSMALL (for boot floppy) 2004-01-03 01:40:31 +00:00
savecore Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
scsictl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
setkey Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
shutdown Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 10:04:22 +00:00
slattach Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
swapctl bump date for previous 2003-12-21 02:52:02 +00:00
sysctl A little syntactic sugar 2004-03-20 05:22:41 +00:00
ttyflags use strlcat/strlcpy 2003-07-12 14:33:55 +00:00
tunefs When searching for the superblock, don't pick an ffsv1 superblock from the 2004-03-21 20:30:38 +00:00
umount stop umount temporarily modifying what might be argv[n]. 2004-03-12 21:48:32 +00:00
veriexecctl Bump date for previous. 2004-03-06 23:38:40 +00:00
vinum Don't initialize an int to NULL. 2003-10-21 02:33:34 +00:00
wdogctl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
wsconsctl Add text descriptions for wskbd types sun and sun-type5. 2004-01-21 15:39:34 +00:00
Makefile Don't build cgdconfig when MKCRYPTO==no. 2004-01-03 23:34:29 +00:00
Makefile.inc Revert previous; the change that required it will be done differently. 2002-09-27 21:04:46 +00:00