Rockbox

Tasklist

FS#12414 - readdir() broken for plugins in UI simulator

Attached to Project: Rockbox
Opened by Fred Bauer (freddyb) - Tuesday, 29 November 2011, 00:06 GMT
Last edited by Boris Gjenero (dreamlayers) - Tuesday, 29 November 2011, 05:04 GMT
Task Type Bugs
Category Simulator
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Plugins that call rb->readdir() crash. (since r28929) (edit: r28929 not 29929)
This task depends upon

Closed by  Boris Gjenero (dreamlayers)
Tuesday, 29 November 2011, 05:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r31089
Comment by Boris Gjenero (dreamlayers) - Tuesday, 29 November 2011, 02:19 GMT
When HAVE_DIRCACHE is defined, the plugin expects:
struct dirent_cached {
struct dirinfo info;
char *d_name;
long startcluster;
};
but, sim_readdir instead gives it this:
struct sim_dirent {
unsigned char d_name[MAX_PATH];
struct dirinfo info;
long startcluster;
};
It works in core, because there, readdir is readdir_cached. The problem is the PREFIX( ) where directory functions are put into struct plugin_api rockbox_api. That's taken care of elsewhere now. This patch removes the PREFIX( ) and the unnecessary app_closedir and app_readdir wrappers.

Comment by Fred Bauer (freddyb) - Tuesday, 29 November 2011, 03:23 GMT
Sounds good to me.

Loading...