Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions qiling/os/posix/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,22 @@ class macos_x86_open_flags(QlPrettyFlag):
O_BINARY = None
O_LARGEFILE = None

class macos_arm_open_flags(QlPrettyFlag):
O_RDONLY = 0x000000
O_WRONLY = 0x000001
O_RDWR = 0x000002
O_NONBLOCK = 0x000004
O_APPEND = 0x000008
O_ASYNC = 0x000040
O_SYNC = 0x000080
O_NOFOLLOW = 0x000100
O_CREAT = 0x000200
O_TRUNC = 0x000400
O_EXCL = 0x000800
O_NOCTTY = 0x020000
O_DIRECTORY = 0x100000
O_BINARY = None
O_LARGEFILE = None

class linux_x86_open_flags(QlPrettyFlag):
O_RDONLY = 0x000000
Expand Down
4 changes: 3 additions & 1 deletion qiling/os/posix/const_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def get_open_flags_class(archtype: QL_ARCH, ostype: QL_OS) -> Union[Type[Flag],

QL_OS.MACOS: {
QL_ARCH.X86: macos_x86_open_flags,
QL_ARCH.X8664: macos_x86_open_flags
QL_ARCH.X8664: macos_x86_open_flags,
QL_ARCH.ARM: macos_arm_open_flags,
QL_ARCH.ARM64: macos_arm_open_flags
},

QL_OS.WINDOWS: {
Expand Down
Loading