]> git.ipfire.org Git - thirdparty/qemu.git/commit
semihosting: add O_BINARY flag in host_open for NT compatibility
authorEvgeny Iakovlev <eiakovlev@linux.microsoft.com>
Tue, 24 Jan 2023 18:01:16 +0000 (18:01 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Thu, 2 Feb 2023 11:48:20 +0000 (11:48 +0000)
commit0bccdb42df66b697e0a4681c2ad4f10eccef5330
treeb9dbdff111ba365ffc3441e00324bce0f0c73c92
parent978c2bf97b2f8b0938dc6570c46275ed8d8e96f8
semihosting: add O_BINARY flag in host_open for NT compatibility

Windows open(2) implementation opens files in text mode by default and
needs a Windows-only O_BINARY flag to open files as binary. QEMU already
knows about that flag in osdep and it is defined to 0 on non-Windows,
so we can just add it to the host_flags for better compatibility.

Signed-off-by: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20230106102018.20520-1-eiakovlev@linux.microsoft.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230124180127.1881110-25-alex.bennee@linaro.org>
semihosting/syscalls.c