Message ID | 20230110173922.265055-15-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2878493pvb; Tue, 10 Jan 2023 11:20:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXs3RJunUeQIRhBdoSsTdDTvQLi4pz5eCHk2AnhITBjR3wU5jxXgrC4Y1qmtwNNODvJN1SkY X-Received: by 2002:a0c:8dc7:0:b0:532:3b2d:3995 with SMTP id u7-20020a0c8dc7000000b005323b2d3995mr5856198qvb.39.1673378400762; Tue, 10 Jan 2023 11:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673378400; cv=none; d=google.com; s=arc-20160816; b=pHVMQqXjuzgAdzfmE/XQGp+tN5OzvCXNe6yQucBpHUI7UiYC0u5wYe0CJ2jjye5EBF jeYnnUhgo2Q3XNBP1w9atAy3M4SFBadhftKKX5xx4DBGdEqL5TEJNk2wWvTgYHPM3aR6 iGSVpWBmEGwevsRhYnJOfHnD7cCHphbrrtJq45LyxLS4YpzEznNN4c+1VXIPPb9j7vW0 wMmxYZ2gYc2aHfHktUPKaXsgxdCH+nfmRYEhvGYQ5MTXJn/u26CPZFN4DV6IGDJGTaAv D4mFdvpTCcjq1eZKA6S6ofAdP51+pqP9SkR795zziEpPglQyLWqFETa7QQIxUsrbV+0p 0AsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ETifGALS4KmBJlNwYTjtra3baBU/IlLzVll0TgmEm7I=; b=ON3xEZKcaXdPwFGsvsTwHZbrCTi+bR6vRJ8HmVMkacOwok6MbaiaaJVRbjf8ja7v/l /7ltiSm/n3z60bO60y0+YGTHQfP0W28/qfQ6eqn3qH8yZTe5bDR0dVftTjMiqFqVpHD8 3CtHmDZveyYWE2/pKTpqnut7YIIbcu7FUwr5EFSD/VvoOztPzO/TKI+vCukIz9sVTeF1 YkT2bR4UaG8M4amBMLdZ1JDIPXcMsRrnRBXzAqHsH8tysgy9K3Jkokb1WsiqKSDQ/2MD 9t3FVvrCKGwn4H9rrWV9/ZW9XSYxvQgaqReWrIwZ8vGLHF9u5J5C5cGQrxdHqkUzJ3/B l5yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B1yQ1/Vb"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fq2-20020a056214258200b004c6ff7ee04csi6631168qvb.487.2023.01.10.11.20.00 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 11:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B1yQ1/Vb"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1pFIb8-0003Xv-Pd; Tue, 10 Jan 2023 12:39:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1pFIb6-0003WF-C4 for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:39:40 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1pFIb2-0001D1-7m for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:39:40 -0500 Received: by mail-wm1-x331.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso6022297wms.4 for <qemu-devel@nongnu.org>; Tue, 10 Jan 2023 09:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ETifGALS4KmBJlNwYTjtra3baBU/IlLzVll0TgmEm7I=; b=B1yQ1/Vb+V9nZz4lyn28CsVZ2MTvvEpdfNjN4RJjJRUkcPlvcMT7OvZxUPZy8FpCBs t0WDlz6K+Q5OBroVFTarm4KodBhr641oYu1BDfFoNEzZQwN2oSuzaxC5qWOmOh6jbhuE NI5WC5DppwOoo9iRmNLQaH5c6YdOFlT1rDDrln53mmYOYSJUmrpHr0yuFMrV6PTgxb3V LO9rNbl942g7sFxffX3TPccR3GKvCKkdeFZl+IulNbr4YYtlQHNji6b+bghPF588BZdQ INxDniwgAycmd546D88n7bY/VSj4L8s03bbq/8WKGYIl84EOJrsicXhG3oXeyYm89IaF 7T2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ETifGALS4KmBJlNwYTjtra3baBU/IlLzVll0TgmEm7I=; b=4E4a9jG0kKJcyzUjtz6yAiZeWWS26Ok+2xqyfo71JcWSgykScCaDvZb3cST1qXzq9t cBdAIBKrnM5HM/CKUs9kNXoYYy9Xm0AY9MHnx4BjJPid3by2rtzDzFdK0EiESxGe46uQ QbQjLa4q/06c3MTvRgIj0NLq4Ox0uLAF8IcnlmnBxvkr5H6ian/K6F3xxxxD8/zlXYwp CZkOx9oNo8Fff6E1d3ZtlvMW9HIo1+INPfDvIZG5BvESRsR2QnTb2uTs4krlPWM8w5Vb is6n/m7MMiUiMKgVDWA5uB8PQoh0Z4z5XlK35wyoM7+9uTZr5juYexaDQqOmz71IQx11 bb2g== X-Gm-Message-State: AFqh2kqMUL289XKl5jmrqklZFIl51ZBjGPucHZ5BBFTPP3X32ZZ5mWZC 7yeydSLxQC2uKXnkmdA6/eg/yA== X-Received: by 2002:a05:600c:229a:b0:3d9:ec70:befc with SMTP id 26-20020a05600c229a00b003d9ec70befcmr7543365wmf.13.1673372375520; Tue, 10 Jan 2023 09:39:35 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bo30-20020a056000069e00b0027a57c1a6fbsm11891959wrb.22.2023.01.10.09.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 09:39:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B123C1FFBA; Tue, 10 Jan 2023 17:39:24 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Beraldo Leal <bleal@redhat.com>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Ed Maste <emaste@freebsd.org>, Yanan Wang <wangyanan55@huawei.com>, Cleber Rosa <crosa@redhat.com>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Markus Armbruster <armbru@redhat.com>, Jagannathan Raman <jag.raman@oracle.com>, =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= <berrange@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org>, Michael Roth <michael.roth@amd.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= <alex.bennee@linaro.org>, qemu-arm@nongnu.org, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, John G Johnson <john.g.johnson@oracle.com>, Evgeny Iakovlev <eiakovlev@linux.microsoft.com>, Bin Meng <bmeng.cn@gmail.com> Subject: [PATCH 14/26] semihosting: add O_BINARY flag in host_open for NT compatibility Date: Tue, 10 Jan 2023 17:39:10 +0000 Message-Id: <20230110173922.265055-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110173922.265055-1-alex.bennee@linaro.org> References: <20230110173922.265055-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
current maintainer trees (testing/semihosting/plugins)
|
expand
|
diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c index ba28194b59..e89992cf90 100644 --- a/semihosting/syscalls.c +++ b/semihosting/syscalls.c @@ -253,7 +253,7 @@ static void host_open(CPUState *cs, gdb_syscall_complete_cb complete, { CPUArchState *env G_GNUC_UNUSED = cs->env_ptr; char *p; - int ret, host_flags; + int ret, host_flags = O_BINARY; ret = validate_lock_user_string(&p, cs, fname, fname_len); if (ret < 0) { @@ -262,11 +262,11 @@ static void host_open(CPUState *cs, gdb_syscall_complete_cb complete, } if (gdb_flags & GDB_O_WRONLY) { - host_flags = O_WRONLY; + host_flags |= O_WRONLY; } else if (gdb_flags & GDB_O_RDWR) { - host_flags = O_RDWR; + host_flags |= O_RDWR; } else { - host_flags = O_RDONLY; + host_flags |= O_RDONLY; } if (gdb_flags & GDB_O_CREAT) { host_flags |= O_CREAT;