Changes in uspace/lib/c/generic/time.c [b7fd2a0:38d150e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/time.c
rb7fd2a0 r38d150e 585 585 if (clock_conn == NULL) { 586 586 category_id_t cat_id; 587 errno_t rc = loc_category_get_id("clock", &cat_id, IPC_FLAG_BLOCKING);587 int rc = loc_category_get_id("clock", &cat_id, IPC_FLAG_BLOCKING); 588 588 if (rc != EOK) 589 589 goto fallback; … … 617 617 618 618 struct tm time; 619 errno_t rc = clock_dev_time_get(clock_conn, &time);619 int rc = clock_dev_time_get(clock_conn, &time); 620 620 if (rc != EOK) 621 621 goto fallback; … … 634 634 if (ktime == NULL) { 635 635 uintptr_t faddr; 636 errno_t rc = sysinfo_get_value("clock.faddr", &faddr);636 int rc = sysinfo_get_value("clock.faddr", &faddr); 637 637 if (rc != EOK) { 638 638 errno = rc; … … 954 954 * @param result Structure to store the result to 955 955 * 956 * @return EOK or a nerror code957 * 958 */ 959 errno_t time_utc2tm(const time_t time, struct tm *restrict result)956 * @return EOK or a negative error code 957 * 958 */ 959 int time_utc2tm(const time_t time, struct tm *restrict result) 960 960 { 961 961 assert(result != NULL); … … 984 984 * ASCTIME_BUF_LEN bytes long. 985 985 * 986 * @return EOK or a nerror code.987 * 988 */ 989 errno_t time_utc2str(const time_t time, char *restrict buf)986 * @return EOK or a negative error code. 987 * 988 */ 989 int time_utc2str(const time_t time, char *restrict buf) 990 990 { 991 991 struct tm tm; 992 errno_t ret = time_utc2tm(time, &tm);992 int ret = time_utc2tm(time, &tm); 993 993 if (ret != EOK) 994 994 return ret; … … 1036 1036 * @param result Structure to store the result to. 1037 1037 * 1038 * @return EOK on success or a nerror code.1039 * 1040 */ 1041 errno_t time_tv2tm(const struct timeval *tv, struct tm *restrict result)1038 * @return EOK on success or a negative error code. 1039 * 1040 */ 1041 int time_tv2tm(const struct timeval *tv, struct tm *restrict result) 1042 1042 { 1043 1043 // TODO: Deal with timezones. … … 1066 1066 * @param result Structure to store the result to. 1067 1067 * 1068 * @return EOK on success or a nerror code.1069 * 1070 */ 1071 errno_t time_local2tm(const time_t time, struct tm *restrict result)1068 * @return EOK on success or a negative error code. 1069 * 1070 */ 1071 int time_local2tm(const time_t time, struct tm *restrict result) 1072 1072 { 1073 1073 struct timeval tv = { … … 1088 1088 * ASCTIME_BUF_LEN bytes long. 1089 1089 * 1090 * @return EOK on success or a nerror code.1091 * 1092 */ 1093 errno_t time_local2str(const time_t time, char *buf)1090 * @return EOK on success or a negative error code. 1091 * 1092 */ 1093 int time_local2str(const time_t time, char *buf) 1094 1094 { 1095 1095 struct tm loctime; 1096 errno_t ret = time_local2tm(time, &loctime);1096 int ret = time_local2tm(time, &loctime); 1097 1097 if (ret != EOK) 1098 1098 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.