Line | |
---|
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 |
|
---|
8 | PUBLIC 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.