source: trunk/minix/lib/posix/_utime.c@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 526 bytes
RevLine 
[9]1/* utime(2) for POSIX Authors: Terrence W. Holm & Edwin L. Froese */
2
3#include <lib.h>
4#define utime _utime
5#include <string.h>
6#include <utime.h>
7
8PUBLIC int utime(name, timp)
9_CONST char *name;
10_CONST struct utimbuf *timp;
11{
12 message m;
13
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;
21 }
22 m.m2_p1 = (char *) name;
23 return(_syscall(FS, UTIME, &m));
24}
Note: See TracBrowser for help on using the repository browser.