mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
Kernel: Make utime() take path+length, remove SmapDisabler
This commit is contained in:
parent
1226fec19e
commit
53bda09d15
Notes:
sideshowbarker
2024-07-19 10:18:36 +09:00
Author: https://github.com/awesomekling
Commit: 53bda09d15
3 changed files with 18 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue