summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c (follow)
Commit message (Collapse)AuthorAge
* Add IO priority handling. Currently all IO has equal priority, except the ↵Frank Gevaerts2010-04-03
| | | | | | | | | | | | dircache scanning thread which is lower. This fixes the slow boot problem for me, with the added benefit that actual audio playback also starts faster. Lots of the changes are due to changing storage_(read|write)sectors() from macros to wrapper functions. This means that they have to be called with IF_MD2(drive,) again. Flyspray: FS#11167 Author: Frank Gevaerts git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25459 a1c6a512-1295-4272-9138-f99709370657
* FS#11118: reduce the number of cached sector in FAT code because some are ↵Amaury Pouly2010-03-22
| | | | | | useless after a rewrite of LFN entries handling. Also makes LFN handling more robust. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25290 a1c6a512-1295-4272-9138-f99709370657
* Fix a typo on a commentMustapha Senhaji2010-03-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25210 a1c6a512-1295-4272-9138-f99709370657
* fat: make fat_open more flexible by accepting the file==&dir->file and make ↵Amaury Pouly2010-03-15
| | | | | | fat_opendir also more flexible by accepting dir==parent_dir git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25202 a1c6a512-1295-4272-9138-f99709370657
* Merge branch 'hotswap'Maurus Cuelenaere2009-11-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23759 a1c6a512-1295-4272-9138-f99709370657
* Fix Free and Disk size display when SECTOR_SIZE!=512Frank Gevaerts2009-11-09
| | | | | | | | | Flyspray: FS#10656 Author: Laurent Papier git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23595 a1c6a512-1295-4272-9138-f99709370657
* FAT timestamp handling improvements for non-RTC targets:Jens Arnold2009-08-16
| | | | | | | | | | - When writing to a file that is older than the build, file date is set to the build date. - Time is advanced so that the minutes are a multiple of 11, excluding '00', and seconds = minutes. This is done as a hint that the time isn't 100% correct. - Date increment uses actual month lengths (but without leap year handling) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22348 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9545, storage cleanup and multi-driver supportFrank Gevaerts2009-07-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
* FS#10080Nils Wallménius2009-07-14
| | | | | | | | | | * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
* implement single-driver storage layer with macros instead of inlinesFrank Gevaerts2008-11-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18975 a1c6a512-1295-4272-9138-f99709370657
* Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts2008-11-01
| | | | | | | | | that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
* cleanup storage definesFrank Gevaerts2008-10-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18950 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Moved atoi declaration to stdlib.h. Deleted atoi.hBertrik Sikken2008-04-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
* Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now ↵Michael Sevakis2008-04-06
| | | | | | with shared variables in DRAM (it seems swp(b) is at least partially broken on all PP or I'm doing something very wrong here :\). For core-shared data use SHAREDBSS/DATA_ATTR. NOCACHEBSS/DATA_ATTR is available whether or not single core is forced for static peripheral-DMA buffer allocation without use of the UNCACHED_ADDR macro in code and is likely useful on a non-PP target with a data cache (although not actually enabled in config.h and the .lds's in this commit). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16981 a1c6a512-1295-4272-9138-f99709370657
* Add a complete priority inheritance implementation to the scheduler (all ↵Michael Sevakis2008-03-25
| | | | | | mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
* Hotswap code shuffling: Fix yellow. Simplify some target function access. ↵Michael Sevakis2008-03-12
| | | | | | Keep fat lock access from compiling for Ondios - think of a nicer way later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16637 a1c6a512-1295-4272-9138-f99709370657
* Do some crackdown on kernel object reinitialization after they could be in ↵Michael Sevakis2008-03-12
| | | | | | use and use before initialization. For c200/e200: Be sure fat cache and ata locks are acquired in the proper order during hot swapping. Delay hotswap monitoring until after initial file mounting (address 2nd kobj concern + possible call of fat driver before init). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16636 a1c6a512-1295-4272-9138-f99709370657
* Let the FAT namecheck also look for trailing spaces, fixes FS #8560.Peter D'Hoye2008-02-07
| | | | | | Only call the dircache rename function if the actual rename was ok. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16241 a1c6a512-1295-4272-9138-f99709370657
* Code police, no functional changes (yet)Peter D'Hoye2007-10-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15352 a1c6a512-1295-4272-9138-f99709370657
* Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis2007-10-16
| | | | | | towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
* Fix FS #5852 by trying to properly close and update the recorded file, and ↵Peter D'Hoye2007-10-10
| | | | | | give the FAT the correct file info. Add filehandle checks to some file functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15072 a1c6a512-1295-4272-9138-f99709370657
* Prevent another divide-by-zero (only affecting targets with FAT16 support ↵Dave Chapman2007-07-09
| | | | | | enabled, such as the Sansa). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13837 a1c6a512-1295-4272-9138-f99709370657
* Fix division by 0 errorRobert Keevil2007-07-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13836 a1c6a512-1295-4272-9138-f99709370657
* Fix a (minor) disk corruption when moving directories around. Fixes FS #7359Peter D'Hoye2007-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13797 a1c6a512-1295-4272-9138-f99709370657
* Fix serious bug in FAT filename check, preventing most files from being ↵Magnus Holmgren2007-07-03
| | | | | | created (if they contain a '.', no less). Also allow a few more chars in the long filename and make the code a bit smaller (as in FS #6358). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13776 a1c6a512-1295-4272-9138-f99709370657
* Proper filename checking in the FAT driver (FS#7222 and FS#6358)Jonathan Gordon2007-07-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13770 a1c6a512-1295-4272-9138-f99709370657
* Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from ↵Jens Arnold2007-03-16
| | | | | | -Wundef. No code change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
* remove runtime detection of h1x0 series RTC MOD, but leave driver codeRobert Kukla2007-03-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12554 a1c6a512-1295-4272-9138-f99709370657
* FS#6419 - driver for H1x0 series RTC Mod with runtime detectionRobert Kukla2007-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
* Remove unused code, make comments c-style, make one private function staticNils Wallménius2007-02-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12480 a1c6a512-1295-4272-9138-f99709370657
* Use the correct constant to avoid confusionPeter D'Hoye2007-02-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12476 a1c6a512-1295-4272-9138-f99709370657
* Better short filename generation. Fixes FS#6648.Peter D'Hoye2007-02-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12475 a1c6a512-1295-4272-9138-f99709370657
* Reverting the FAT32 driver change - it seems to have introduced a bugLinus Nielsen Feltzing2007-01-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12152 a1c6a512-1295-4272-9138-f99709370657
* Changed fat_getnext():Linus Nielsen Feltzing2007-01-29
| | | | | | | | | | 1) Fixed a bug where really long filenames could be messed up if they spanned 3 sectors 2) Now uses 2 buffers instead of 3, without copying the buffers with memcpy() 3) Can now use aligned sector reads, first step towards iPod 5.5G 80GB git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12151 a1c6a512-1295-4272-9138-f99709370657
* Much simpler implementation of large virtual sector support, not needing ↵Jens Arnold2006-12-04
| | | | | | larger sector buffers and not touching file.c at all. secmult is simply used to normalize all sector counts to 512-byte physical sectors. * Moved MAX_SECTOR_SIZE definition to config-*.h, and enabled it for iPod Video only. MAX_SECTOR_SIZE now only enables checking for alternate disk layouts due to sector size (as iPod Video G5.5 is presented as having 2048-byte _physical_ sectors to the PC). Large virtual sector support in fat.c is always enabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11659 a1c6a512-1295-4272-9138-f99709370657
* Removed unused variable, and fixed overflow in free/total calculation. There ↵Jens Arnold2006-12-03
| | | | | | are still some suspicious things in here... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11656 a1c6a512-1295-4272-9138-f99709370657
* Fixed the warnings.Miika Pekkarinen2006-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11653 a1c6a512-1295-4272-9138-f99709370657
* Add support (runtime detection) for 2048 bytes/sector filesystem.Miika Pekkarinen2006-12-03
| | | | | | | | | Large sectors are enabled for iPod Video (including 5.5G) only. Might still cause FS corruption (however, unlikely), so beware! Based on FS#6169 by Robert Carboneau. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11651 a1c6a512-1295-4272-9138-f99709370657
* Reduced the logf output. Please enable the lines only when necessary.Miika Pekkarinen2006-08-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10410 a1c6a512-1295-4272-9138-f99709370657
* Applied FS# 5736 by Alexander Levin.Rani Hod2006-07-31
| | | | | | | Fixed fat buffer overflow with LFNs longer than 255 bytes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10389 a1c6a512-1295-4272-9138-f99709370657
* Correctly test on volume id flagPeter D'Hoye2006-05-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9925 a1c6a512-1295-4272-9138-f99709370657
* Comparing short filenames for uniqueness used 1 char too much, causing it to ↵Peter D'Hoye2006-04-08
| | | | | | create identical short filenames. Fixes bugreport #5030. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9563 a1c6a512-1295-4272-9138-f99709370657
* waiting is over: initial unicode commitMarcoen Hirschberg2005-12-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
* Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC ↵Dave Chapman2005-12-04
| | | | | | defines from config-*.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
* Cosmetic correction (doesn't affect compiled code) - use letohNN instead of ↵Dave Chapman2005-10-06
| | | | | | htoleNN in update_fat_entry() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7586 a1c6a512-1295-4272-9138-f99709370657
* Replace SWAB16 and SWAB32 with a comprehensive set of byte-swap macros - ↵Dave Chapman2005-10-06
| | | | | | letoh16, letoh32, htole16, htole32, betoh16, betoh32, htobe16 and htobe32 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7584 a1c6a512-1295-4272-9138-f99709370657
* Adds a filename sanity check to add_dir_entry that at the moment only checks ↵Jonas Häggqvist2005-09-07
| | | | | | for names ending in a period, but can easily be extended. Changes the error codes for add_dir_entry. Fixes bug #782248. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7487 a1c6a512-1295-4272-9138-f99709370657
* For targets without an RTC, use the rockbox build date as the start date in ↵Jens Arnold2005-09-06
| | | | | | the FAT driver. No more 2003-08-01 files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7478 a1c6a512-1295-4272-9138-f99709370657
* Adding entries to the FAT16 root dir still failed under certain conditions. ↵Jens Arnold2005-04-27
| | | | | | The shortcut check cannot work the way it was implemented - removed it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6363 a1c6a512-1295-4272-9138-f99709370657