feat: implement utime libc function, SYS_UTIME syscall, filesystem support (ext2 only)
This commit is contained in:
1 parent
771c3a5a98
commit
1c498ffa6a
15 files changed
+158
-30
No files matched your search
@@ -307,6 +307,21 @@ namespace Fs::Vfs {
|
||||
return result;
|
||||
}
|
||||
|
||||
int VfsSetTimes(const char* path, int64_t atime, int64_t mtime) {
|
||||
int drive;
|
||||
const char* localPath;
|
||||
|
||||
if (!ParsePath(path, drive, localPath)) return -1;
|
||||
|
||||
vfsLock.Acquire();
|
||||
FsDriver* driver = DriverForLocked(drive);
|
||||
int result = (driver != nullptr && driver->SetTimes != nullptr)
|
||||
? driver->SetTimes(driver->ctx, localPath, atime, mtime)
|
||||
: -2;
|
||||
vfsLock.Release();
|
||||
return result;
|
||||
}
|
||||
|
||||
int VfsMkdir(const char* path) {
|
||||
int drive;
|
||||
const char* localPath;
|
||||
|
||||
Reference in new issue
Block a user