bin/142384: sync fsck_msdosfs with OpenBSD

Pedro F. Giffuni giffunip at tutopia.com
Mon Jan 11 00:20:04 UTC 2010


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

From: "Pedro F. Giffuni" <giffunip at tutopia.com>
To: FreeBSD-gnats-submit at FreeBSD.org, freebsd-bugs at FreeBSD.org
Cc:  
Subject: Re: bin/142384: sync fsck_msdosfs with OpenBSD
Date: Sun, 10 Jan 2010 16:12:23 -0800 (PST)

 --0-1379220581-1263168743=:30404
 Content-Type: text/plain; charset=us-ascii
 
 While here,.. 
 - clarify a bit the FAT header
 - ansify a couple of functions
 
 
       
 --0-1379220581-1263168743=:30404
 Content-Type: application/octet-stream; name=patch-fsck_msdosfs
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=patch-fsck_msdosfs
 
 ZGlmZiAtcnUgZnNja19tc2Rvc2ZzLm9yaWcvYm9vdC5jIGZzY2tfbXNkb3Nm
 cy9ib290LmMKLS0tIGZzY2tfbXNkb3Nmcy5vcmlnL2Jvb3QuYwkyMDEwLTAx
 LTA2IDExOjA3OjI0LjAwMDAwMDAwMCArMDAwMAorKysgZnNja19tc2Rvc2Zz
 L2Jvb3QuYwkyMDEwLTAxLTEwIDE4OjA3OjQ3LjAwMDAwMDAwMCArMDAwMApA
 QCAtMTAsMTMgKzEwLDYgQEAKICAqIDIuIFJlZGlzdHJpYnV0aW9ucyBpbiBi
 aW5hcnkgZm9ybSBtdXN0IHJlcHJvZHVjZSB0aGUgYWJvdmUgY29weXJpZ2h0
 CiAgKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0
 aGUgZm9sbG93aW5nIGRpc2NsYWltZXIgaW4gdGhlCiAgKiAgICBkb2N1bWVu
 dGF0aW9uIGFuZC9vciBvdGhlciBtYXRlcmlhbHMgcHJvdmlkZWQgd2l0aCB0
 aGUgZGlzdHJpYnV0aW9uLgotICogMy4gQWxsIGFkdmVydGlzaW5nIG1hdGVy
 aWFsc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