Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by Victor Rajewski - 2007-09-28
Last edited by Bertrik Sikken - 2008-04-15

FS#7849 - set_time() uses rtc_write_time() incorrectly

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

Closed by  Bertrik Sikken
2008-04-15 18:34
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in 17123

Bertrik Sikken commented on 2007-10-25 20:27

As far as I can see you’re right, but nobody’s checking the result of set_time() currently.
Attached is a patch that should fix it.

Bertrik Sikken commented on 2008-04-14 20:19

On second thought, the situation is a little more complicated. Depending on the hardware driver, function rtc_write_datetime returns various values, for example the as3514 driver returns 1, the uisim stub returns 0 and the ds1339 driver returns the return value of a call to sw_i2c_write (which itself returns <0 on error and 0 if things are OK).

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing