From e53a39d9ec28b24ea0d408f1500e987d005cd651 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 19 Apr 2017 15:34:04 +0200 Subject: Lua shell :) --- src/syslua/lx/sysdef.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/syslua/lx/sysdef.lua (limited to 'src/syslua/lx/sysdef.lua') diff --git a/src/syslua/lx/sysdef.lua b/src/syslua/lx/sysdef.lua new file mode 100644 index 0000000..7c0d14f --- /dev/null +++ b/src/syslua/lx/sysdef.lua @@ -0,0 +1,36 @@ +-- Constant definitions based on common/include/proto/fs.h + +return { + -- FILE TYPES + FT_REGULAR = 0, + FT_DIR = 0x01, + FT_DEV = 0x02, + FT_BLOCKDEV = 0x04, + FT_CHARDEV = 0x08, + FT_CHANNEL = 0x10, + FT_FRAMEBUFFER = 0x20, + + -- FILE MODES + FM_READ = 0x01, + FM_WRITE = 0x02, + FM_READDIR = 0x04, + FM_MMAP = 0x08, + FM_CREATE = 0x10, + FM_TRUNC = 0x20, + FM_APPEND = 0x40, + FM_IOCTL = 0x100, + FM_BLOCKING = 0x200, + FM_DCREATE = 0x1000, + FM_DMOVE = 0x2000, + FM_DDELETE = 0x4000, + FM_ALL_MODES = 0xFFFF, + + -- IOCTL calls + IOCTL_BLOCKDEV_GET_BLOCK_SIZE = 40, + IOCTL_BLOCKDEV_GET_BLOCK_COUNT = 41, + + -- Modes for select call + SEL_READ = 0x01, + SEL_WRITE = 0x02, + SEL_ERROR = 0x04, +} -- cgit v1.2.3