1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

Kernel: Make utime() take path+length, remove SmapDisabler

This commit is contained in:
Andreas Kling 2020-01-06 12:23:30 +01:00
parent 1226fec19e
commit 53bda09d15
3 changed files with 18 additions and 17 deletions

View file

@ -1,12 +1,17 @@
#include <Kernel/Syscall.h>
#include <errno.h>
#include <string.h>
#include <utime.h>
extern "C" {
int utime(const char* pathname, const struct utimbuf* buf)
{
int rc = syscall(SC_utime, (u32)pathname, (u32)buf);
if (!pathname) {
errno = EFAULT;
return -1;
}
int rc = syscall(SC_utime, pathname, strlen(pathname), buf);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}