VM: simplify slab allocator
[minix.git] / lib / libc / gen / minix / utime.c
blob9991744962bb91aee8776ae4ae900c8f9bc486fb
1 /* utime(2) for POSIX Authors: Terrence W. Holm & Edwin L. Froese */
3 #include <sys/cdefs.h>
4 #include "namespace.h"
5 #include <lib.h>
7 #include <string.h>
8 #include <utime.h>
10 int utime(const char *name, const struct utimbuf *timp)
12 message m;
14 if (timp == NULL) {
15 m.m2_i1 = 0; /* name size 0 means NULL `timp' */
16 m.m2_i2 = strlen(name) + 1; /* actual size here */
17 } else {
18 m.m2_l1 = timp->actime;
19 m.m2_l2 = timp->modtime;
20 m.m2_i1 = strlen(name) + 1;
22 m.m2_p1 = (char *) __UNCONST(name);
23 return(_syscall(VFS_PROC_NR, UTIME, &m));