FS#7598 - Dircache support for multivolume targets.
This patch add support for dircache on targets with multivolume support. Additional volumes are appended to the root directory of the cache with filenames such as <microSD1> in the same way as for the uncached multivolume support.
At the moment I think this only affects the e200 as the only multivolume target with sufficient RAM for dircache to be enabled(?)
For targets with hotswap, the cache is rebuilt on insertion/removal of the card.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Fix e200 sim build & reset entry count on cache rebuild.
Fixes hang that occured when swapping cards with dircache disabled.
Sync’d to todays SVN, was out of sync because of the c200 port.
Oops wrong file…
Sync
We need a code clean up in order to get this committed, Slasheri said. Like “so that vol_names etc. aren’t defined multiple times”.
could somone sync to the svn? i get hunk errors when applying the patch
Synced
Code clean up: no longer uses multiple definitions of vol_names and strip_volume.
This version also no longer increases the dircache stack size, as this should be unnecessary.
Thanks for the patch, it looks quite good now. But I still found one memory allocation issue to be solved. Now there is the following code:
…
#if defined(HAVE_MULTIVOLUME) && !defined(SIMULATOR)
…
You are trying to write to a memory location that is just a null pointer reference (ce→d_name). You have to allocate ce→d_name first before using it. And the second parameter “size” for snprintf (i.e., VOL_ENUM_POS+3) should be the maximum allocated size of the buffer (ce→d_name) to prevent buffer overflows, not the length of the data to be written.
But I will look again once that problem is solved, no time now to fix it:/
Okay, I *think* that this allocates memory correctly. I still use VOL_ENUM_POS+3 for the max size as this is now the allocated size of the buffer.
I’ve also fixed compilation for non-multivolume targets.
This version removes some duplication of code that was in the previous patch by better use of ifdefs.