Serenity Operating System
at master 23 lines 448 B view raw
1/* 2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <errno.h> 8#include <string.h> 9#include <syscall.h> 10#include <utime.h> 11 12extern "C" { 13 14int utime(char const* pathname, const struct utimbuf* buf) 15{ 16 if (!pathname) { 17 errno = EFAULT; 18 return -1; 19 } 20 int rc = syscall(SC_utime, pathname, strlen(pathname), buf); 21 __RETURN_WITH_ERRNO(rc, rc, -1); 22} 23}