UPDATED VERSION!! This one has the right year on the comments, and is also 4x more efficient in how it searches. Also includes a minor bugfix to prevent possible (unlikely) segfault in the event that the search for the patch-point fails. Slightly safer overall, but either version works. Original post now deleted.

ANOTHER UPDATE: this one actually uses the correct new max_fid value from the partition size; the earlier versions forgot to multiply by 2, which normally results in a lower max_fid than that started with!

YET ANOTHER UPDATE: I finally figured out why Peter's number was "off" by 0x1000 in his messages: fixed overhead area for dynamic playlists etc.. in the dynamic data partition. This version of the utility now subtracts this from the new max_fid value (no harm with the previous version, though). As of this version (VERSION 4), it also now prints a version number banner at startup.

Okay, here's some C-code. Works for me on all v2/v3 player versions, and should also work fine on pretty much any other player version. Lots of error-checking included, so I believe it to be very safe.

If compiled for the player, one could just FTP the binary over to an empeg, remount the root drive RW, and then run it with no args. It will figure out how big the /dev/hda3 dynamic data partition is, and hack that value into /empeg/bin/player, all automatically.

Alternatively, one can compile/run it on any Linux/POSIX machine, and supply two command-line parameters: the absolute path to the player binary (must begin with a slash), and the new max_fid value (as otherwise it will use the computer's /dev/hda3 size, which probably won't be correct..).

Cheers


Attachments
250489-set_empeg_max_fid.c (340 downloads)