Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

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

Attached to Project: Rockbox
Opened by Fred Bauer (freddyb) - Tuesday, 29 November 2011, 01:06 GMT+2
Last edited by Boris Gjenero (dreamlayers) - Tuesday, 29 November 2011, 06:04 GMT+2
Task Type Bugs
Category Simulator
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
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, 06:04 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r31089
Comment by Boris Gjenero (dreamlayers) - Tuesday, 29 November 2011, 03:19 GMT+2
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.

   plugin_dir_function_fix.patch (0.8 KiB)
 apps/plugin.c |   20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

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

Loading...