diff --git a/syscall/linux/c.lua b/syscall/linux/c.lua index 06c878bf30..3ec5c15390 100644 --- a/syscall/linux/c.lua +++ b/syscall/linux/c.lua @@ -7,12 +7,8 @@ Note a fair number are being deprecated, see include/uapi/asm-generic/unistd.h u Some of these we already don't use, but some we do, eg use open not openat etc. ]] -local require, error, assert, tonumber, tostring, -setmetatable, pairs, ipairs, unpack, rawget, rawset, -pcall, type, table, string, select = -require, error, assert, tonumber, tostring, -setmetatable, pairs, ipairs, unpack, rawget, rawset, -pcall, type, table, string, select +local require, tonumber, pcall, select = +require, tonumber, pcall, select local abi = require "syscall.abi" @@ -34,7 +30,6 @@ local uint, ulong = ffi.typeof("unsigned int"), ffi.typeof("unsigned long") local h = require "syscall.helpers" local err64 = h.err64 -local errpointer = h.errpointer local i6432, u6432 = bit.i6432, bit.u6432 @@ -53,7 +48,6 @@ else arg64u = function(val) return u6432(val) end end -- _llseek very odd, preadv -local function llarg64u(val) return u6432(val) end local function llarg64(val) return i6432(val) end local C = {} @@ -69,7 +63,6 @@ local u64 = ffi.typeof("uint64_t") -- TODO could make these return errno here, also are these best casts? local syscall_long = ffi.C.syscall -- returns long local function syscall(...) return tonumber(syscall_long(...)) end -- int is default as most common -local function syscall_uint(...) return uint(syscall_long(...)) end local function syscall_void(...) return void(syscall_long(...)) end local function syscall_off(...) return u64(syscall_long(...)) end -- off_t