diff options
author | Bryant Mairs <bryant@mai.rs> | 2017-08-26 21:03:52 -0700 |
---|---|---|
committer | Bryant Mairs <bryant@mai.rs> | 2017-08-27 15:40:57 -0700 |
commit | d322aa9a3f8e685eb6f48843f22ec12127f6251d (patch) | |
tree | 5254e08504fe7a9a4ed0b52103926c0e2b53802b /src/sys/memfd.rs | |
parent | a1067a2ffbd92030fd82525c8dca501e7f5945fb (diff) | |
download | nix-d322aa9a3f8e685eb6f48843f22ec12127f6251d.zip |
Remove syscall module.
This module merely contained FFI declarations, and only enough to
implement memfd_create() and pivot_root() wrapper functions in
nix. Since these declarations are redundant with equivalent FFI
declarations in libc, we'll remove them here. In the future, any
syscall-related wrapper function will be implemented directly and
utilize libc for FFI declarations as we cannot generically expose
a type-safe `syscall()` because of its variadic argument list.
Diffstat (limited to 'src/sys/memfd.rs')
-rw-r--r-- | src/sys/memfd.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sys/memfd.rs b/src/sys/memfd.rs index b9812943..056e9e43 100644 --- a/src/sys/memfd.rs +++ b/src/sys/memfd.rs @@ -11,8 +11,9 @@ bitflags!( ); pub fn memfd_create(name: &CStr, flags: MemFdCreateFlag) -> Result<RawFd> { - use sys::syscall::{syscall, MEMFD_CREATE}; - let res = unsafe { syscall(MEMFD_CREATE, name.as_ptr(), flags.bits()) }; + let res = unsafe { + libc::syscall(libc::SYS_memfd_create, name.as_ptr(), flags.bits()) + }; Errno::result(res).map(|r| r as RawFd) } |