Miika Pekkarinen
d80246fac0
Committed the missing file to r16632.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16634 a1c6a512-1295-4272-9138-f99709370657
2008-03-11 19:52:07 +00:00
Peter D'Hoye
c04f497670
Let the FAT namecheck also look for trailing spaces, fixes FS #8560 .
...
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
2008-02-07 22:15:13 +00:00
Peter D'Hoye
eb947cdde1
Another fix for file system issues when encountering disk full (like when recording)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15920 a1c6a512-1295-4272-9138-f99709370657
2007-12-13 23:36:22 +00:00
Peter D'Hoye
bae8f4c316
More code police...
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15353 a1c6a512-1295-4272-9138-f99709370657
2007-10-29 00:04:35 +00:00
Peter D'Hoye
85058f5d9c
Fix FS #5852 by trying to properly close and update the recorded file, and 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
2007-10-10 23:26:17 +00:00
Jonathan Gordon
e73f287b5a
Fix FS#7679 - modifying files with dircahce enabled doesnt change the access time/date in dircache
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14580 a1c6a512-1295-4272-9138-f99709370657
2007-09-02 13:24:51 +00:00
Kevin Ferrare
011a325e32
Makes apps and plugins interract with directories using a posix-like api instead of calling dircache / simulator functions (no additionnal layer added, only a cosmetic change)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13943 a1c6a512-1295-4272-9138-f99709370657
2007-07-20 17:06:55 +00:00
Daniel Stenberg
5079812031
avoid declaring shadow 'rc' variables (-Wshadow!)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13270 a1c6a512-1295-4272-9138-f99709370657
2007-04-26 10:29:41 +00:00
Jens Arnold
67eb154146
Removed 'mode' parameter from creat(). It wasn't pure posix anyway, it was ignored on target and mixed into 'oflags' in the simulator. * Simplified io.c a bit by defining a dummy O_BINARY for OSes which don't have that.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12179 a1c6a512-1295-4272-9138-f99709370657
2007-02-01 23:08:15 +00:00
Jens Arnold
ef3e129b65
Much simpler implementation of large virtual sector support, not needing 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
2006-12-04 21:37:22 +00:00
Miika Pekkarinen
ae66c2b9ee
Add support (runtime detection) for 2048 bytes/sector filesystem.
...
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
2006-12-03 18:12:19 +00:00
Hardeep Sidhu
2436dbabe7
Update dircache startcluster at file close when writing. Fixes bug when creating small files (dircache startcluster remains 0 because fat write doesn't occur until close).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9950 a1c6a512-1295-4272-9138-f99709370657
2006-05-16 06:53:41 +00:00
Miika Pekkarinen
d489377d46
Fixed the file renaming/removing issue with dircache enabled.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9649 a1c6a512-1295-4272-9138-f99709370657
2006-04-13 21:14:13 +00:00
Miika Pekkarinen
82f32e3f73
Do the dircache operation first to block properly when necessary.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9356 a1c6a512-1295-4272-9138-f99709370657
2006-03-30 10:20:44 +00:00
Miika Pekkarinen
2d93495df2
Boost open() performance on platforms with dircache. Tagcache initial
...
scanning now over 50% faster than before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9306 a1c6a512-1295-4272-9138-f99709370657
2006-03-28 11:51:12 +00:00
Jens Arnold
7a0110eedd
TAB policed.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8887 a1c6a512-1295-4272-9138-f99709370657
2006-03-02 22:29:53 +00:00
Dan Everton
ccd0e7451d
Change rename() to set errno to EXDEV if a rename is attempted across volumes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8883 a1c6a512-1295-4272-9138-f99709370657
2006-03-02 11:03:34 +00:00
Jens Arnold
a601fb8d19
More compact & straight-forward headbytes handling.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8255 a1c6a512-1295-4272-9138-f99709370657
2005-12-17 12:17:11 +00:00
Miika Pekkarinen
a6a0c4b2d5
Now the file corruption bug when reading & writing the same file is
...
hopefully fully fixed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8251 a1c6a512-1295-4272-9138-f99709370657
2005-12-16 20:44:41 +00:00
Miika Pekkarinen
d9dcb0fbcf
Fixed a file system driver caching bug corrupting files on certain situations
...
(when reading and writing the same file).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8231 a1c6a512-1295-4272-9138-f99709370657
2005-12-13 16:11:00 +00:00
Miika Pekkarinen
ab78b04680
Implemented directory caching. No more waiting for disk to spin up while
...
browsing when cache is enabled (system -> disk -> enable directory
cache). Cache building on boot is transparent except the first boot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7588 a1c6a512-1295-4272-9138-f99709370657
2005-10-07 17:38:05 +00:00
Jörg Hohensohn
dc7534bdb2
preparations for hotswapping MMC
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5701 a1c6a512-1295-4272-9138-f99709370657
2005-01-28 21:32:16 +00:00
Jean-Philippe Bernardy
cea551dd9c
int -> long where needed
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5643 a1c6a512-1295-4272-9138-f99709370657
2005-01-23 23:29:35 +00:00
Jörg Hohensohn
da84857631
prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657
2004-12-28 22:16:07 +00:00
Jens Arnold
f78524bf93
Bug fix: Do only flush the sector buffer after writing head bytes if it really needs to be. The old code did flush always, causing the huge slowdown of fprintf() and other places writing byte-wise
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5413 a1c6a512-1295-4272-9138-f99709370657
2004-11-17 02:34:17 +00:00
Jörg Hohensohn
85c91a3b8e
void* can't be offset, gcc should not allows this
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5147 a1c6a512-1295-4272-9138-f99709370657
2004-10-01 19:45:51 +00:00
Jens Arnold
8537e2d12a
Bug fix: open() now handles O_TRUNC correctly (this was the real cause for the .playlist_control corruption)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5048 a1c6a512-1295-4272-9138-f99709370657
2004-09-06 23:33:21 +00:00
Linus Nielsen Feltzing
e0e0140f4e
Bug fix: renaming a directory could cause a name clash. New feature: rename() can now move files/directories as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5008 a1c6a512-1295-4272-9138-f99709370657
2004-08-22 11:28:24 +00:00
Jens Arnold
f68e13c5b4
The pathname argument for open() is declared const, so copy it has to be copied
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4894 a1c6a512-1295-4272-9138-f99709370657
2004-07-19 21:08:44 +00:00
Linus Nielsen Feltzing
b8beff39e9
No need to call fat_truncate() to delete the file, fat_remove() frees all clusters anyway
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4508 a1c6a512-1295-4272-9138-f99709370657
2004-04-16 08:54:13 +00:00
Linus Nielsen Feltzing
5c8e82e097
You can't open() a directory as a file (at least not for writing)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4359 a1c6a512-1295-4272-9138-f99709370657
2004-03-10 19:47:59 +00:00
Linus Nielsen Feltzing
05f1fc4654
Empty file/dir names are now rejected by open() and mkdir()
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4303 a1c6a512-1295-4272-9138-f99709370657
2004-02-11 14:37:16 +00:00
Daniel Stenberg
ae960a9ece
my take at fixing the simulator warnings by adding mode_t, size_t, ssize_t
...
and off_t
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4116 a1c6a512-1295-4272-9138-f99709370657
2003-12-08 21:58:38 +00:00
Hardeep Sidhu
9e4262081b
Added dynamic playlists. ON+PLAY->Playlist on a track, directory, or playlist from file browser to see available options.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3796 a1c6a512-1295-4272-9138-f99709370657
2003-07-01 21:05:43 +00:00
Björn Stenberg
a4baacd3ec
Renamed flush() to fsync() to be more in line with POSIX/unix
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3766 a1c6a512-1295-4272-9138-f99709370657
2003-06-29 13:17:19 +00:00
Linus Nielsen Feltzing
c6db7870ef
Slightly better handling of disk-full situations
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3756 a1c6a512-1295-4272-9138-f99709370657
2003-06-19 12:08:22 +00:00
Björn Stenberg
631b8d3bb8
Update fileoffset and cacheoffset on error.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3556 a1c6a512-1295-4272-9138-f99709370657
2003-04-15 08:07:50 +00:00
Linus Nielsen Feltzing
e98bad5b38
Added the filesize() function
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3473 a1c6a512-1295-4272-9138-f99709370657
2003-03-18 00:39:57 +00:00
Hardeep Sidhu
e5e9bc3e65
Previous change broke read after seek. Reverted that change and added temporary fix in flush_cache to make sure we are on correct sector before writing to disk.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3448 a1c6a512-1295-4272-9138-f99709370657
2003-03-15 21:13:35 +00:00
Hardeep Sidhu
67c1a0c63c
Make sure we are on correct sector after lseek. This fixes the queue file corruption bug.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3443 a1c6a512-1295-4272-9138-f99709370657
2003-03-14 15:39:50 +00:00
Björn Stenberg
3ca8d3589e
flush_cache() failure should still return error.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3433 a1c6a512-1295-4272-9138-f99709370657
2003-03-12 15:15:46 +00:00
Björn Stenberg
188be8ec57
Bug fix: If head bytes were read but sector read failed, return head byte count instead of error.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3432 a1c6a512-1295-4272-9138-f99709370657
2003-03-12 15:06:57 +00:00
Linus Nielsen Feltzing
5f12c8fbc7
Killed compiling error on debug builds
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3425 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 21:55:59 +00:00
Linus Nielsen Feltzing
9cb9c821a0
Killed a warning
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3423 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 20:49:18 +00:00
Linus Nielsen Feltzing
44e51833ed
Zagor added the flush() function
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3416 a1c6a512-1295-4272-9138-f99709370657
2003-03-10 17:10:46 +00:00
Linus Nielsen Feltzing
a077e271ee
rename() didn't close the file if the target name exists, and didn't return a negative error code
...
Enhanced the return codes to make it easier to track panics.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3340 a1c6a512-1295-4272-9138-f99709370657
2003-02-26 02:08:52 +00:00
Linus Nielsen Feltzing
490085aa7d
Lame debug output
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3322 a1c6a512-1295-4272-9138-f99709370657
2003-02-22 01:54:03 +00:00
Björn Stenberg
184fd55411
Directories can now be renamed too.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3167 a1c6a512-1295-4272-9138-f99709370657
2003-01-27 09:32:17 +00:00
Mats Lidell
74cc9e41fa
Remove use of rockbox-mode.el in local variables list.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3157 a1c6a512-1295-4272-9138-f99709370657
2003-01-24 10:56:06 +00:00
Hardeep Sidhu
d2f90c9a74
Use flush_cache() when writing headbytes to disk to make sure we are on the correct sector.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3023 a1c6a512-1295-4272-9138-f99709370657
2002-12-19 00:51:39 +00:00