projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
travis: update
[m6w6/ext-psi]
/
psi.d
/
stat.psi
diff --git
a/psi.d/stat.psi
b/psi.d/stat.psi
index 0b222250120dab30d2b2f791cb54689eefd6927e..68f67814df9d0f954874e148d8bec5c013fd7c7f 100644
(file)
--- a/
psi.d/stat.psi
+++ b/
psi.d/stat.psi
@@
-1,8
+1,9
@@
-extern int stat(char *path, struct stat *buf);
+#include <sys/stat.h>
+// extern int stat(char *path, struct stat *buf);
function psi\stat(string $path, array &$buf = NULL) : int {
let path = strval($path);
function psi\stat(string $path, array &$buf = NULL) : int {
let path = strval($path);
- let buf = calloc(1, s
truct stat
);
- return to_int(stat);
+ let buf = calloc(1, s
izeof(struct stat)
);
+ return
stat(path, buf) as
to_int(stat);
set $buf = to_array(*buf,
to_int(st_dev),
to_int(st_ino),
set $buf = to_array(*buf,
to_int(st_dev),
to_int(st_ino),
@@
-20,7
+21,6
@@
function psi\stat(string $path, array &$buf = NULL) : int {
to_int(tv_sec),
to_int(tv_nsec)
),
to_int(tv_sec),
to_int(tv_nsec)
),
- to_int(st_atime),
to_array(st_mtim,
to_int(tv_sec),
to_int(tv_nsec)
to_array(st_mtim,
to_int(tv_sec),
to_int(tv_nsec)
@@
-29,7
+29,6
@@
function psi\stat(string $path, array &$buf = NULL) : int {
to_int(tv_sec),
to_int(tv_nsec)
),
to_int(tv_sec),
to_int(tv_nsec)
),
- to_int(st_mtime),
to_array(st_ctim,
to_int(tv_sec),
to_int(tv_nsec)
to_array(st_ctim,
to_int(tv_sec),
to_int(tv_nsec)
@@
-38,12
+37,14
@@
function psi\stat(string $path, array &$buf = NULL) : int {
to_int(tv_sec),
to_int(tv_nsec)
),
to_int(tv_sec),
to_int(tv_nsec)
),
- to_int(st_ctime),
+ to_array(st_birthtim,
+ to_int(tv_sec),
+ to_int(tv_nsec)
+ ),
to_array(st_birthtimespec,
to_int(tv_sec),
to_int(tv_nsec)
),
to_array(st_birthtimespec,
to_int(tv_sec),
to_int(tv_nsec)
),
- to_int(st_birthtime),
to_int(st_blksize),
to_int(st_blocks),
to_int(st_flags),
to_int(st_blksize),
to_int(st_blocks),
to_int(st_flags),