Author: wmb Date: Mon Apr 30 19:38:14 2012 New Revision: 2958 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2958
Log: OLPC trac 11823 - sys-time&date was returning the wrong month. OFW represents month numbers as 1..12, consistent with human usage, while POSIX localtime() represents them as 0..11, more convenient for indexing into C arrays.
Modified: forth/kernel/sysio.fth
Modified: forth/kernel/sysio.fth ============================================================================== --- forth/kernel/sysio.fth Mon Apr 30 00:40:54 2012 (r2957) +++ forth/kernel/sysio.fth Mon Apr 30 19:38:14 2012 (r2958) @@ -171,8 +171,8 @@
: l@+ ( adr -- l adr' ) dup l@ swap la1+ ; : sys-time&date ( -- s m h d m y ) - d# 64 syscall retval ( adr ) - l@+ l@+ l@+ l@+ l@+ l@+ drop d# 1900 + ( s m h d m y ) + d# 64 syscall retval ( adr ) + l@+ l@+ l@+ l@+ l@+ 1+ l@+ drop d# 1900 + ( s m h d m y ) ;
: install-wrapper-alloc ( -- )
openfirmware@openfirmware.info