utime.c (315B)
1 /* 2 * utime.c - update timestamp of file 3 * Copyright (C) 2026. All rights reserved. 4 */ 5 6 #include "libc.h" 7 8 int utime(const char *path, const struct utimbuf *times) { 9 long ret = syscall(SYS_utime, (long)path, (long)times, 0, 0, 0, 0); 10 11 if (ret < 0) { 12 errno = -ret; 13 return -1; 14 } 15 16 return (int)ret; 17 }