#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
203827 |
|
13-Feb-2010 |
kib |
- Add idempotency guards so the structures can be used in other utilities. - Update bpb structs with reserved fields. - In direntry struct join deName with deExtension. Although a fix was attempted in the past, these fields were being overflowed, Now this is consistent with the spec, and we can now share the WinChksum code with NetBSD.
Submitted by: Pedro F. Giffuni <giffunip tutopia com> Mostly obtained from: NetBSD Reviewed by: bde MFC after: 2 weeks
|
#
171406 |
|
12-Jul-2007 |
bde |
Fix some bugs involving the fsinfo block (many remain unfixed). This is part of fixing msdosfs for large sector sizes. One of the fixed bugs was fatal for large sector sizes.
1. The fsinfo block has size 512, but it was misunderstood and declared as having size 1024, with nothing in the second 512 bytes except a signature at the end. The second 512 bytes actually normally (if the file system was created by Windows) consist of a second boot sector which is normally (in WinXP) empty except for a signature -- the normal layout is one boot sector, one fsinfo sector, another boot sector, then these 3 sectors duplicated. However, other layouts are valid. newfs_msdos produces a valid layout with one boot sector, one fsinfo sector, then these 2 sectors duplicated. The signature check for the extra part of the fsinfo was thus normally checking the signature in either the second boot sector or the first boot sector in the copy, and thus accidentally succeeding. The extra signature check would just fail for weirder layouts with 512-byte sectors, and for normal layouts with any other sector size.
Remove the extra bytes and the extra signature check.
2. Old versions did i/o to the fsinfo block using size 1024, with the second half only used for the extra signature check on read. This was harmless for sector size 512, and worked accidentally for sector size 1024. The i/o just failed for larger sector sizes.
The version being fixed did i/o to the fsinfo block using size fsi_size(pmp) = (1024 << ((pmp)->pm_BlkPerSec >> 2)). This expression makes no sense. It happens to work for sector small sector sizes, but for sector size 32K it gives the preposterous value of 64M and thus causes panics. A sector size of 32768 is necessary for at least some DVD-RW's (where the minimum write size is 32768 although the minimum read size is 2048).
Now that the size of the fsinfo block is 512, it always fits in one sector so there is no need for a macro to express it. Just use the sector size where the old code uses 1024.
Approved by: re (kensmith) Approved by: nyan (several years ago for a different version of (2))
|
#
165792 |
|
05-Jan-2007 |
rodrigc |
Eliminate obsolete comment, now that getushort() is implemented in terms of functions in <sys/endian.h>.
|
#
165431 |
|
21-Dec-2006 |
marcel |
Unbreak 64-bit little-endian systems that do require alignment. The fix involves using le16dec(), le32dec(), le16enc() and le32enc(). This eliminates invalid casts and duplicated logic.
|
#
165342 |
|
19-Dec-2006 |
rodrigc |
For big-endian version of getulong() macro, cast result to u_int32_t. This macro was written expecting a 32-bit unsigned long, and doesn't work properly on 64-bit systems. This bug caused vn_stat() to return incorrect values for files larger than 2gb on msdosfs filesystems on 64-bit systems.
PR: 106703 Submitted by: Axel Gonzalez <loox e-shell net> MFC after: 3 days
|
#
165341 |
|
18-Dec-2006 |
rodrigc |
Fix get_ulong() macro on AMD64 (or any little-endian 64-bit platform). This bug caused vn_stat() to fail on files larger than 2gb on msdosfs filesystems on AMD64.
PR: 106703 Tested by: Axel Gonzalez <loox e-shell net> MFC after: 3 days
|
#
139776 |
|
06-Jan-2005 |
imp |
/* -> /*- for copyright notices, minor format tweaks as necessary
|
#
123874 |
|
26-Dec-2003 |
trhodes |
Forced commit to note that my previous commit was a Darwin merge.
|
#
87061 |
|
28-Nov-2001 |
jhb |
Axe more unused GEMDOS code that was #ifdef atari.
PR: kern/21809 Submitted by: <mbendiks@eunet.no>
|
#
65075 |
|
25-Aug-2000 |
bde |
Quick fix for msdsofs_write() on alphas and other machines with either longs larger than 32 bits or strict alignment requirements.
pm_fatmask had type u_long, but it must have a type that has precisely 32 bits and this type must be no smaller than int, so that ~pmp->pm_fatmask has no bits above the 31st set. Otherwise, comparisons between (cn | ~pmp->pm_fatmask) and magic 32-bit "cluster" numbers always fail. The correct fix is to use the C99 type uint_least32_t and mask with 0xffffffff. The quick fix is to use u_int32_t and assume that ints have
msdosfs metadata is riddled with unaligned fields, and on alphas, unaligned_fixup() apparently has problems fixing up the unaligned accesses caused by this. The quick fix is to not comment out the NetBSD code that sort of handles this, and define UNALIGNED_ACCESS on i386's so that the code doesn't change on i386's. The correct fix would define UNALIGNED_ACCESS in a central machine-dependent header and maybe add some extra cases to unaligned_fixup(). UNALIGNED_ACCESS is also tested in isofs.
Submitted by: parts by Mark Abene <phiber@radicalmedia.com> PR: 19086
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
33548 |
|
18-Feb-1998 |
jkh |
Update MSDOSFS code using NetBSD's msdosfs as a guide to support FAT32 partitions. Unfortunately, we looked around here at Walnut Creek CDROM for any newer FAT32-supporting versions of Win95 and we were unsuccessful; only the older stuff here. So this is untested beyond simply making sure it compiles and someone with access to an actual FAT32 fs will have to let us know how well it actually works. Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Obtained from: NetBSD
|
#
22975 |
|
22-Feb-1997 |
peter |
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
13765 |
|
30-Jan-1996 |
mpp |
Fix a bunch of spelling errors in the comment fields of a bunch of system include files.
|
#
8876 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
2893 |
|
19-Sep-1994 |
dfr |
Added msdosfs.
Obtained from: NetBSD
|