Changeset 508fff8 in mainline


Ignore:
Timestamp:
2012-10-24T00:14:36Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f220e25
Parents:
5c90e3e
Message:

rtc: do not cache the boottime if rtc_read() failed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/time/cmos-rtc/cmos-rtc.c

    r5c90e3e r508fff8  
    410410        /* Try to normalize the content of the tm structure */
    411411        time_t r = mktime(t);
    412 
    413         rtc->boottime = r - uptime_get();
     412        int result;
     413
     414        if (r < 0)
     415                result = EINVAL;
     416        else {
     417                rtc->boottime = r - uptime_get();
     418                result = EOK;
     419        }
    414420
    415421        fibril_mutex_unlock(&rtc->mutex);
    416422
    417         return r < 0 ? EINVAL : EOK;
     423        return result;
    418424}
    419425
Note: See TracChangeset for help on using the changeset viewer.