From 0e5b2871ca6456b01d4bf037a6e68badf1ff1a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henryk=20Pl=C3=B6tz?= Date: Fri, 3 Oct 2014 19:58:52 +0200 Subject: Initial commit of djbdns-1.05.tar.gz Source was http://cr.yp.to/djbdns/djbdns-1.05.tar.gz, SHA1 2efdb3a039d0c548f40936aa9cb30829e0ce8c3d --- utime.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 utime.c (limited to 'utime.c') diff --git a/utime.c b/utime.c new file mode 100644 index 0000000..4b7984f --- /dev/null +++ b/utime.c @@ -0,0 +1,24 @@ +#include +#include +#include "scan.h" +#include "exit.h" + +char *fn; + +char *ustr; +unsigned long u; +time_t ut[2]; + +int main(int argc,char **argv) +{ + fn = argv[1]; + if (!fn) _exit(100); + + ustr = argv[2]; + if (!ustr) _exit(100); + scan_ulong(ustr,&u); + + ut[0] = ut[1] = u; + if (utime(fn,ut) == -1) _exit(111); + _exit(0); +} -- cgit v1.2.3