summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c (follow)
Commit message (Collapse)AuthorAge
* 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
* create_dos_name() return value was meaningless.Jens Arnold2005-04-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6333 a1c6a512-1295-4272-9138-f99709370657
* Bugfixes: (1) add_dir_entry() always appended new entries, although the ↵Jens Arnold2005-04-22
| | | | | | code intended to reuse deleted entries. New code reuses deleted entries whenever possible. (2) If the code could not extend the dir to append new entries (FAT16 root dir or disk full), it failed because of (1). (3) Even if reuse had worked, it would never have reused entry 0. (4) Shortname char 0xE5->0x05 replacement to avoid treatment as free entry was done for all chars although it should only be done for the first. The 0x05->0xE5 replacement on read was missing altogether. (5) Obey directory size limit (65536 entries == 2 MB). Improvements: (1) The (undocumented) flags used by WinNT derivates to store the case of a shortname's name and extension part are now supported for reading. (2) smaller code size. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6332 a1c6a512-1295-4272-9138-f99709370657
* Little fix, when debug is disabled clusterchain length was incorrectly computedJean-Philippe Bernardy2005-03-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6163 a1c6a512-1295-4272-9138-f99709370657
* long policy fixesJean-Philippe Bernardy2005-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6082 a1c6a512-1295-4272-9138-f99709370657
* couple of fixes for 16 bits archsJean-Philippe Bernardy2005-02-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6073 a1c6a512-1295-4272-9138-f99709370657
* long policyJean-Philippe Bernardy2005-02-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6071 a1c6a512-1295-4272-9138-f99709370657
* more long policyJean-Philippe Bernardy2005-02-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6065 a1c6a512-1295-4272-9138-f99709370657
* more long policyJean-Philippe Bernardy2005-02-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6053 a1c6a512-1295-4272-9138-f99709370657
* Shortnames must be uppercase...Jens Arnold2005-02-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5994 a1c6a512-1295-4272-9138-f99709370657
* For shortname creation, replace most illegal characters by underscores ↵Jens Arnold2005-02-16
| | | | | | instead of removing them, thereby lowering the chance to create a blank (illegal) name. Spaces and control chars are still removed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5991 a1c6a512-1295-4272-9138-f99709370657
* Preserve the longname extension as much as possible for shortname creation. ↵Jens Arnold2005-02-16
| | | | | | Randomise the last 4 chars of the name part instead, but only if there is a clash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5988 a1c6a512-1295-4272-9138-f99709370657
* Simplification.Jens Arnold2005-02-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5766 a1c6a512-1295-4272-9138-f99709370657
* Fixed max_cluster calculationJens Arnold2005-02-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5765 a1c6a512-1295-4272-9138-f99709370657
* preparations for hotswapping MMCJörg Hohensohn2005-01-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5701 a1c6a512-1295-4272-9138-f99709370657
* More int -> longJean-Philippe Bernardy2005-01-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5654 a1c6a512-1295-4272-9138-f99709370657
* int -> long where neededJean-Philippe Bernardy2005-01-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5642 a1c6a512-1295-4272-9138-f99709370657
* Fixed some warnings.Jens Arnold2005-01-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5537 a1c6a512-1295-4272-9138-f99709370657
* unmount function in preparation for MMC hotswap, more mutexingJörg Hohensohn2005-01-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5536 a1c6a512-1295-4272-9138-f99709370657
* Multivolume: prevent file rename attempts across volumes.Jens Arnold2005-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5535 a1c6a512-1295-4272-9138-f99709370657
* modify fat cache entries atomic, this was potentially unsafeJörg Hohensohn2005-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5534 a1c6a512-1295-4272-9138-f99709370657
* Correct handling of FAT16 root directory when it does not start on a pseudo ↵Jens Arnold2005-01-03
| | | | | | cluster boundary. Fixed some places where the cluster number can become negative. Significant code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5527 a1c6a512-1295-4272-9138-f99709370657
* killed a warning for boxes not supporting FAT16Jörg Hohensohn2004-12-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5515 a1c6a512-1295-4272-9138-f99709370657
* prepared to mount multiple partitions into one logical file system (most ↵Jörg Hohensohn2004-12-28
| | | | | | useful for Ondio, internal memory + external MMC) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657
* Removed #include math.hLinus Nielsen Feltzing2004-11-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5382 a1c6a512-1295-4272-9138-f99709370657
* cleaned out parts of bpb which we don't useJörg Hohensohn2004-10-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5274 a1c6a512-1295-4272-9138-f99709370657
* panic on write behind partition, tooJörg Hohensohn2004-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5171 a1c6a512-1295-4272-9138-f99709370657
* FAT16 support for the OndioJörg Hohensohn2004-09-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5114 a1c6a512-1295-4272-9138-f99709370657
* Bug fix: renaming a directory could cause a name clash. New feature: ↵Linus Nielsen Feltzing2004-08-22
| | | | | | rename() can now move files/directories as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5008 a1c6a512-1295-4272-9138-f99709370657
* Const policed pointer arguments to functions, part 2Jens Arnold2004-08-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
* Removed nasty lvalue castLinus Nielsen Feltzing2004-07-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4934 a1c6a512-1295-4272-9138-f99709370657
* New function: rmdir(). Also some changes in the fat code, to track the ↵Linus Nielsen Feltzing2004-04-16
| | | | | | parent directory in opendir(), to be able to delete directories git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4509 a1c6a512-1295-4272-9138-f99709370657
* Added cluster size to the disk debug screenLinus Nielsen Feltzing2004-04-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4469 a1c6a512-1295-4272-9138-f99709370657
* Oops. Wrong arguments to memset(). Thanks to Mike Wilson for pointing that out.Linus Nielsen Feltzing2004-01-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4274 a1c6a512-1295-4272-9138-f99709370657
* Ooops. Forgot to clear the newly allocated cluster in mkdir()Linus Nielsen Feltzing2004-01-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4242 a1c6a512-1295-4272-9138-f99709370657
* Second bug in mkdir() :-)Linus Nielsen Feltzing2004-01-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4241 a1c6a512-1295-4272-9138-f99709370657