_kern_set_real_time_clock now returns a status, we now use it for errno

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9818 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2004-11-07 01:16:12 +00:00
parent dc1680bc47
commit 3a88903282

View File

@ -4,14 +4,16 @@
*/
#include <time.h>
#include <OS.h>
#include <errno.h>
#include "syscalls.h"
// ToDo: replace zero by a ROOT_UID when usergroup.c is implemented
int
stime(const time_t *tp)
{
status_t status;
if (tp == NULL) {
errno = EINVAL;
return -1;
@ -20,7 +22,11 @@ stime(const time_t *tp)
errno = EPERM;
return -1;
}
set_real_time_clock(*tp);
return B_OK;
status = _kern_set_real_time_clock(*tp);
if (status < B_OK) {
errno = status;
return -1;
}
return 0;
}