From 6541803339c5499d89befdeaa893805e49568bae Mon Sep 17 00:00:00 2001 From: Will Sowerbutts Date: Sat, 14 Feb 2015 22:36:23 +0000 Subject: [PATCH] ucp: Set file times correctly --- Standalone/xfs1b.c | 7 ------- Standalone/xfs2.c | 16 ++++++++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Standalone/xfs1b.c b/Standalone/xfs1b.c index 84ca02f6..09d79405 100644 --- a/Standalone/xfs1b.c +++ b/Standalone/xfs1b.c @@ -444,10 +444,3 @@ int _umount(char *spec) i_deref(sino); return (-1); } - -int _time(int tvec[]) -{ - udata.u_error = 0; - // rdtime(tvec); /* In machdep.c */ - return (0); -} diff --git a/Standalone/xfs2.c b/Standalone/xfs2.c index f44ae7b5..aba3541c 100644 --- a/Standalone/xfs2.c +++ b/Standalone/xfs2.c @@ -7,6 +7,7 @@ UZI (Unix Z80 Implementation) Utilities: xfs2.c */ /*LINTLIBRARY*/ +#include #include #include #include @@ -961,14 +962,17 @@ int getperm(inoptr ino) */ void setftime(inoptr ino, int flag) { + time_t now; ino->c_dirty = 1; - //if (flag & A_TIME) - // rdtime(&(ino->c_node.i_atime)); - //if (flag & M_TIME) - // rdtime(&(ino->c_node.i_mtime)); - //if (flag & C_TIME) - // rdtime(&(ino->c_node.i_ctime)); + now = time(NULL); + + if (flag & A_TIME) + ino->c_node.i_atime = now; + if (flag & M_TIME) + ino->c_node.i_mtime = now; + if (flag & C_TIME) + ino->c_node.i_ctime = now; } -- 2.34.1