Hello,
I think the logfdump function is buggy. More precisely, it fails to correctly display multiline.
When printing a long line on my Sansa e200, it stops after the first MAX_LOGF_ENTRY characters instead of correctly displaying the whole line.
I suspect the bug is due to those lines:
memcpy(ptr, logfbuffer[tindex], MAX_LOGF_ENTRY);
ptr += MAX_LOGF_ENTRY;
Indeed, by copying MAX_LOGF_ENTRY characters, it also copy the 0 at the end of each line (added by strlcpy if _logf) so the output stops at the end of first part of the whole line.
I think is must be changed to:
memcpy(ptr, logfbuffer[tindex], MAX_LOGF_ENTRY-1);
ptr += MAX_LOGF_ENTRY-1;
Then the output of logfdump is correct.
Am I correct ?