1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #if defined(LIBC_SCCS) && !defined(lint) 9 static char sccsid[] = "@(#)utime.c 5.4 (Berkeley) 02/23/91"; 10 #endif /* LIBC_SCCS and not lint */ 11 12 #include <sys/time.h> 13 #include <utime.h> 14 15 int 16 utime(path, times) 17 const char *path; 18 const struct utimbuf *times; 19 { 20 struct timeval tv[2]; 21 22 tv[0].tv_sec = times->actime; 23 tv[1].tv_sec = times->modtime; 24 tv[0].tv_usec = tv[1].tv_usec = 0; 25 return(utimes(path, tv)); 26 } 27