Rockbox

  • Status Closed
  • Percent Complete
    100%
  • 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 Jonas Häggqvist - 2006-11-07
Last edited by Jonas Häggqvist - 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  Jonas Häggqvist
2007-11-08 11:19
Reason for closing:  Out of Date
Additional comments about closing:  

No longer needed as of r15526

Jonas Häggqvist commented on 2006-11-07 22:40

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!

Steve Bavin commented on 2006-11-08 07:00

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).

Jonas Häggqvist commented on 2006-11-08 10:00

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?

Jonas Häggqvist commented on 2006-11-08 11:19

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.

Jonas Häggqvist commented on 2006-11-08 11:21

Forgot one buffer.

Steve Bavin commented on 2007-08-01 15:51

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing