Various additions and fixes.
This commit is contained in:
parent
74f990ad84
commit
fd04aacee1
57 changed files with 2176 additions and 159 deletions
21
src/lib9/dirwstat.c
Normal file
21
src/lib9/dirwstat.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <u.h>
|
||||
#define NOPLAN9DEFINES
|
||||
#include <libc.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
int
|
||||
dirwstat(char *file, Dir *dir)
|
||||
{
|
||||
struct timeval tv[2];
|
||||
|
||||
/* BUG handle more */
|
||||
if(dir->mtime == ~0ULL)
|
||||
return 0;
|
||||
|
||||
tv[0].tv_sec = dir->mtime;
|
||||
tv[0].tv_usec = 0;
|
||||
tv[1].tv_sec = dir->mtime;
|
||||
tv[1].tv_usec = 0;
|
||||
return utimes(file, tv);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue