summaryrefslogtreecommitdiff
path: root/sys/msdosfs
AgeCommit message (Collapse)Author
2010-05-16Make the DE_INTERNALIZE/EXTERNALIZE macros copy to/from the structNicholas Marriott
direntry deName[8]/deExtension[3] buffers separately rather than in one 11 byte copy. Makes gcc4 -Wbounded happy. ok krw
2010-03-29Initialize various uninitialized variables. Found by jsg@ via Clang.Kenneth R Westerback
Feedback from miod@ and kettenis@. ok beck@
2010-01-24"Fix" crash caused by FAT32 re-use of small buf from buffer cache,Kenneth R Westerback
at least until problem (starting somewhere between 4.1 and 4.2) in buffer cache is found and a general fix is in place. Simply B_INVAL small buf so it doesn't come back. Addresses PR#6290, confirmed by submitter RD Thrush. ok tedu@ "should be marked XXX" thib@
2010-01-17Remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok tedu@ krw@
2009-12-19Re-introduce the remaining bits of thib@'s Aug 2006 VOP_CLOSE()Kenneth R Westerback
locking fixes. Tweak cd9660 code to be the same as everywhere else, no functional change. ok beck@
2009-10-31Use suser when possible. Suggested by miod@.Federico G. Schwindt
miod@ deraadt@ ok.
2009-08-30lock the vnode before calling VOP_CLOSE() in msdofs_unmount().Thordur I. Bjornsson
ok krw@
2009-08-14- deregister; no binary changeJasper Lievisse Adriaanse
ok thibski@
2009-08-13- ansify function declarations, no binary changeJasper Lievisse Adriaanse
"fine" thib@
2009-08-13- remove super-obvious comments from $fs_vnodeop_entries[]Jasper Lievisse Adriaanse
prodded by and ok thib@ agreed by art@ and blambert@
2009-08-13- missing printf("\n"); after calling lockmgr_printinfo()Jasper Lievisse Adriaanse
"do it" thib@
2009-08-09indicate success for setting directory attributes; first step towardsMartynas Venckus
making directory moves work... discussed w. & makes sense - millert@
2009-07-09Remove the VREF() macro and replaces all instances with a call to verf(),Thordur I. Bjornsson
which is exactly what the macro does. Macro's that are nothing more then: #define FUNCTION(arg) function(arg) are almost always pointless and should go away. OK blambert@ Agreed by many.
2009-01-05The FAT32 fsinxtfree field is advisory in nature and we don't useKenneth R Westerback
it. So leave it untouched. Similiar to but more ruthless than the fixes FreeBSD did, since they do use the value. Basically avoid various off-by-one and off-by-many errors. Fixes problems encountered by jsg@ and deraadt@ where filesystems found on SDHC cards caused UVM faults. Original fixes found by jsg@. ok jsg@.
2008-06-09Update access(2) to have modern semantics with respect to X_OK andTodd C. Miller
the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@
2008-01-13Return pcbmap() errors from deget() rather than ignoring them. EIO atKenneth R Westerback
least has been seen from ian@'s new iPod, causing inappropriate mounting. ok miod@
2007-11-27typos; ok jmc@Martynas Venckus
sys/dev/pci/pciide.c from naddy@
2007-11-26Fix jsg@'s iRiver Clix by relaxing the test for SecPerTrack to allowKenneth R Westerback
64 instead of 63. deraadt@, weingart@, millert@, thib@, miod@ ok with eliminating test entirely but tom@'s voice of caution wins out for the quick commit. Tested by jsg@ to confirm it fixes his device.
2007-11-15read boot sector as 4K block, because of new ipod nanoTheo de Raadt
from Alexey Vatchenko; ok tom
2007-10-29MALLOC/FREE -> malloc/freeCharles Longeau
ok krw@
2007-10-06Oops. Forgot to do FREE -> free when I did MALLOC -> malloc.Kenneth R Westerback
2007-10-03MALLOC+bzero -> malloc+M_ZERO.Kenneth R Westerback
In ip_esp.c all allocated memory is now zero'd in the "malloc(sizeof(*tc) + alen ..." case. The +alen memory was not initialized by the bzero() call. Noticed by chl@. "Looks good" art@ "seems ok" chl@
2007-09-17Only the most obvious bzero() -> M_ZERO changes. No cast changes, noKenneth R Westerback
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an immediately adjacent bzero().
2007-06-02convert all daddr_t types to either daddr64_t or uint32_t or other suchTheo de Raadt
things based on their use. ok with fixes from tom, tested by grange too
2007-06-01pedro ok'd this ~3500 line diff which removes the vop argumentTheo de Raadt
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.
2007-04-11Remove the simplelock argument from vrecycle();Thordur I. Bjornsson
ok pedro@, sturm@
2007-04-10When doing a rename and finding out the destination name alreadyPedro Martelletto
exists, keep the containing directory's long name capabilities. From NetBSD via Enache Adrian, okay millert@.
2007-04-02When running out of space to place a directory entry in msdosfs_readdir(),Pedro Martelletto
save the correct offset in case the directory has support for long file names, and return it to the caller so she can proceed from a valid point. From Alexey Vatchenko, okay tedu@.
2007-03-21Remove the v_interlock simplelock from the vnode structure.Thordur I. Bjornsson
Zap all calls to simple_lock/unlock() on it (those calls are #defined away though). Remove the LK_INTERLOCK from the calls to vn_lock() and cleanup the filesystems wich implement VOP_LOCK(). (by remvoing the v_interlock from there calls to lockmgr()). ok pedro@, art@, tedu@
2007-03-18get rid of noop vop_reallocblks; pedro@ miod@ okMichael Shalayeff
2007-01-16Retire VOP_LEASE(); It was a bit for NQNFS and hasThordur I. Bjornsson
effectively been a no-op for quite some time now, without promise for future usage. ok pedro@ Testing by krw@ (earlier diff) and Johan Mson Lindman (tybollt@solace.miun.se)
2006-12-16Adopt FreeBSD's code for non-DEV_BSIZE formatted MSDOSFS filesystems.Kenneth R Westerback
Enables devices (e.g. newer iPods, various other mp3 players) that use 2048 byte sectors. Inspired by original diffs from weingart@ and Alexey Vatchenk. ok tom@ pedro@ deraadt@ weingart@ marco@
2006-12-15Nuke GEMDOSFS. Unused part of unused atari port. SimplifiesKenneth R Westerback
MSDOSFS code. Eliminates -G option to mount_msdos. Nit detection by gwk@, tom@, jmc@. ok weingart@ tom@ thib@ dlg@ deraadt@
2006-12-14Remove dirsperblk, which is not used after it is calculated.Tom Cosgrove
ok weingart@ pedro@
2006-12-14If an MS-DOS filesystem claims to have more clusters than can beTom Cosgrove
represented in the FAT, limit the number of clusters we work with to the FAT value. This stops corrupt filesystems causing us to run off the end of the FAT and panic()ing in fillinusemap(). Found by Jason Crawford (jasonrcrawford at gmail.com) with the MOKB fs fuzzer. Initial debugging by thib@. ok krw@
2006-11-29detect potential multiplicative overflow before allocation, and return viaTheo de Raadt
the error path; ok pedro
2006-11-26Fix malloc() panic in msdosfs_mountfs(), okay thib@ deraadt@Pedro Martelletto
Found using fuzz generator written by lmh@info-pull.com
2006-10-16Use daddr64_t for logical blocks, okay krw@ thib@ mickey@Pedro Martelletto
2006-10-03Introduce daddr64_t and use it for physical block numbersPedro Martelletto
Okay weingart@, "I'm game with putting my name on it" dlg@
2006-08-22remove the check for the number of heads reported by the BPB altogether,Nikolay Sturm
there are devices reporting zero heads; we don't use this value anyways ok pedro, reported by Igor Grabin <violent at death.kiev.ua>
2006-08-07Revert last commitPedro Martelletto
2006-08-06obey the locking disaplince wrt to VOP_CLOSE during umountsThordur I. Bjornsson
and mount error paths. ok sturm@ pedro@
2006-07-19from FreeBSD:Nikolay Sturm
Don't reject FAT file systems with a number of "Heads" greater than 255; USB keychains exist that use 256 as the number of heads. This check has also been removed in Darwin (along with most of the other head/sector sanity checks). this fixes pr 4988, ok pedro
2006-01-09Put vprint() under DIAGNOSTIC, as to save space in generated ramdisks.Pedro Martelletto
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.
2005-12-01Add missing cache_purge() in msdosfs_rename().Pedro Martelletto
Spotted by tedu@, okay tom@ and tedu@.
2005-11-19Remove unnecessary lockmgr() archaism that was costing too much in termsPedro Martelletto
of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
2005-10-08When moving a directory to under a new parent, write the correctTom Cosgrove
cluster number into our . pointer. This fixes filesystem corruption seen under these circumstances. Testing nick@, krw@, ian@ and others - thanks. "i agree" pedro@; "get it in" deraadt@
2005-09-28No part of the code defines UNALIGNED_ACCESS, use reverted tests forMiod Vallat
__STRICT_ALIGNMENT instead. Help pedro@ deraadt@, ok deraadt@
2005-03-14Fix typo in commentTom Cosgrove