From bcc182e3ebcc8c74f750fd25bf5d0899fab55fdc Mon Sep 17 00:00:00 2001 From: elicn Date: Wed, 19 Mar 2025 20:33:53 +0200 Subject: [PATCH] Use flags integer values --- qiling/os/posix/const_mapping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiling/os/posix/const_mapping.py b/qiling/os/posix/const_mapping.py index 133aa5768..dd95f717e 100644 --- a/qiling/os/posix/const_mapping.py +++ b/qiling/os/posix/const_mapping.py @@ -115,11 +115,11 @@ def ql_open_flag_mapping(ql: Qiling, flags: int) -> int: # flags names are consistent across all classes, even if they are not supported, to maintain compatibility for ef in emul_flags: # test whether flag is set, excluding unsupported flags - if (ef != FLAG_UNSUPPORTED) and (flags & ef.value): + if (ef.value != FLAG_UNSUPPORTED) and (flags & ef.value): hf = host_flags[ef.name or ''] # if flag is also supported on the host, set it - if hf != FLAG_UNSUPPORTED: + if hf.value != FLAG_UNSUPPORTED: ret |= hf.value # NOTE: not sure why this one is needed