This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Feature requests · Rockbox frontpage
FS#7849 - set_time() uses rtc_write_time() incorrectly
Attached to Project:
Rockbox
Opened by Victor Rajewski (vik) - Friday, 28 September 2007, 02:57 GMT+2
Last edited by Bertrik Sikken (bertrik) - Tuesday, 15 April 2008, 20:34 GMT+2
Opened by Victor Rajewski (vik) - Friday, 28 September 2007, 02:57 GMT+2
Last edited by Bertrik Sikken (bertrik) - Tuesday, 15 April 2008, 20:34 GMT+2
|
Detailsset_time() in timefuncs.c expects rtc_write_time() to return 0 on success. However, all rtc_write_time() functions return 1 always (no error checking is done). So set_time() always returns a failure even if clock was set correctly.
|
This task depends upon
Closed by Bertrik Sikken (bertrik)
Tuesday, 15 April 2008, 20:34 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in 17123
Tuesday, 15 April 2008, 20:34 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in 17123
Attached is a patch that should fix it.
A common rule to be derived from this, is that <0 means error and >= 0 means OK. Attached is a patch that evaluates the return value like this.