Return to touch.c CVS log | Up to [local] / src / usr.bin / touch |
version 1.26, 2019/03/10 15:11:52 | version 1.27, 2022/01/29 00:06:26 | ||
---|---|---|---|
|
|
||
/* Create the file. */ | /* Create the file. */ | ||
fd = open(*argv, O_WRONLY | O_CREAT, DEFFILEMODE); | fd = open(*argv, O_WRONLY | O_CREAT, DEFFILEMODE); | ||
if (fd == -1 || futimens(fd, ts) || close(fd)) { | if (fd == -1) { | ||
rval = 1; | rval = 1; | ||
warn("%s", *argv); | warn("%s", *argv); | ||
continue; | |||
} | |||
if (futimens(fd, ts) == -1) { | |||
warn("%s", *argv); | |||
rval = 1; | |||
} | |||
if (close(fd) == -1) { | |||
warn("%s", *argv); | |||
rval = 1; | |||
} | } | ||
} | } | ||
return rval; | return rval; |