Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#10513 - logf and logfdump fix

Attached to Project: Rockbox
Opened by amaury pouly (pamaury) - Tuesday, 11 August 2009, 17:25 GMT+2
Last edited by MohamedTarek (mtarek16) - Saturday, 19 September 2009, 15:46 GMT+2
Task Type Bugs
Category Operating System/Drivers
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch fixes a (long standing ?) bug of logf which caused a misunderstanding of how exactly logfbuffer worked. This fix also contained a rollback of a previous fix of logfdump to accomodate the change (r22250).
   logf.diff (1.5 KiB)
 apps/logfdisp.c |    4 ++--
 firmware/logf.c |    9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

This task depends upon

Closed by  MohamedTarek (mtarek16)
Saturday, 19 September 2009, 15:46 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  Fixed in another task ( FS#10528 ).
Comment by MohamedTarek (mtarek16) - Saturday, 19 September 2009, 03:30 GMT+2
Quick question, why dropping strcpy in favor of memcpy ? in the context of logf, imho, strcpy is better and clearer.
Comment by amaury pouly (pamaury) - Saturday, 19 September 2009, 15:24 GMT+2
Because there are not equivalent in this context and because the implementation doesn't use zero-terminated strings in the buffer. For this reason str(l)cpy is not adapted: it copies a zero-terminated string. In fact, the original str(l)cpy was wrong, it did not implement the behaviour described at the beginning of the file in comments.
Anyway, this weird implementation of logf was dropped and has been replaced by a simpler one ( FS#10528 ).

Loading...