diff options
author | Ori Bernstein <ori@eigenstate.org> | 2014-06-19 02:19:03 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2014-06-19 02:19:03 -0400 |
commit | 083432b480b73587dd8381f072c0a3072d9c2b26 (patch) | |
tree | a3e7036bf90e1a99be1645dfaa0a5c31a479a23b | |
parent | 197018681ecff082c348b5954a69a18e12bcbd50 (diff) | |
download | mc-083432b480b73587dd8381f072c0a3072d9c2b26.tar.gz |
Add getdents function to linux.
-rw-r--r-- | libstd/sys-linux.myr | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libstd/sys-linux.myr b/libstd/sys-linux.myr index 9aa9afc..9d093bf 100644 --- a/libstd/sys-linux.myr +++ b/libstd/sys-linux.myr @@ -64,6 +64,13 @@ pkg std = ino : uint64 ;; + type dirent = struct + ino : uint64 + off : uint64 + reclen : uint16 + name : byte[0] + ;; + type utsname = struct system : byte[65] node : byte[65] @@ -485,6 +492,7 @@ pkg std = const fstat : (fd:fd, sb:statbuf# -> int64) const mkdir : (path : byte[:], mode : int64 -> int64) const ioctl : (fd:fd, req : int64, args:... -> int64) + const getdents64 : (fd:fd, dent : dirent#, count : uint64 -> int64) /* networking */ const socket : (dom : sockfam, stype : socktype, proto : sockproto -> fd) @@ -583,6 +591,7 @@ const ioctl = {fd, req, args (arg, ap) = vanext(ap) -> syscall(Sysioctl, fd, req, arg) castto(int64) } +const getdents64 = {fd, dent, count; -> syscall(Sysgetdents64, fd, dent, count)} /* networking */ const socket = {dom, stype, proto; -> syscall(Syssocket, dom castto(int64), stype, proto) castto(fd)} |