_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:
parent
dc1680bc47
commit
3a88903282
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user