• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category User Interface → Simulator
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by rasher - 2006-11-07
Last edited by rasher - 2007-11-08

FS#6303 - Add argument to specify root dir in simulator

This patch adds a –rootdir argument to allow selecting the root directory when launching the simulator. Quite simple really, but could be handy in a number of situations.

Closed by  rasher
2007-11-08 11:19
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

No longer needed as of r15526

I just realised that using a large path for the rootdir would seriously diminish the possible size of the largest path allowed in the sim. I suppose I could just make all the buffers in io.c be 2*MAX_PATH, but really they should be strlen(rootdir)+MAX_PATH to match the target as close as possible, but that’s probably too complex for me to handle. If anyone wants to help me out, please do!

I would find this patch very useful, currently I have my music collection stored on a server and only copy over a subset to my “archos” directory.

I think that the MAX_PATH*2 solution is the way forward - assuming it only affects the low-level file i/o (which it should).

Yes. I just thought of that. Isn’t the stuff in common/io.c a level below the Rockbox i/o? In that case, using 2*MAX_PATH shouldn’t be a problem at all. Now comes another issue. Is it even a reasonable to use MAX_PATH (260) for a unix or windows path? Can’t they be much larger than that?

Updated patch that adds a restriction of MAX_PATH for the rootdir argument (should be enough in most cases) and changes buffers in io.c to use 2*MAX_PATH instead of 256 as previously.

Forgot one buffer.

Jonas, if you could resync this, I’d like to commit it… although I don’t think paths should be any more than MAX_PATH anywhere.


Available keyboard shortcuts


Task Details

Task Editing