Message ID | 20230124180127.1881110-25-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp341290pvb; Tue, 24 Jan 2023 10:07:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXvbbvUOKdmmv1G2/V60ysV+UICWyyCHYc0Q22l2PRMbaDkb8lpHgm1GkdeDilpAaqskABFG X-Received: by 2002:ac8:1201:0:b0:3b6:3221:a1e7 with SMTP id x1-20020ac81201000000b003b63221a1e7mr38797270qti.68.1674583669544; Tue, 24 Jan 2023 10:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674583669; cv=none; d=google.com; s=arc-20160816; b=yGBfVMDxq+1L4fMZPhbruuxPbRhfmCBSwhwHDYEB/u3+ayaLjgVwQXpzSHeLyK8OYy slVcjA5MLMlBlyNR/XOQQ+OKF0uRHzRACapsAqDmGhPE71wMI7YelNADxJEZbCePq6Xe Ie4ywMHNMqSgnORU71Zx9FFdfcuEfFwkY0Gmk0Vx/LoJt1QCWQv3QyUQayZ/rMRpGnYa +Mr3VhgWrDna1HvEKAjFWIjSIx7SiFzk9njzVeF1wJdapi8GPErUJe/gPXpVuWCvIT6C CpqXS74H9diFjuwHmH1XNZCb+PB2H1UXVhiZcZT8rQG24JzB1yVDaCCr8xmyVUOKQd0Z OzQQ== 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=jOXtY+cNs1rGwYiTe1y7raVByCy+arKXsEUoXPRASOx3cuhZg+O5mfci3ujVHYmhdM +xLf6uaEiGFtLYFlkTfeWvBhydtFRIlZTFCOYpsPigjRXu/eM/Gh1JVAHdhVLT8iFgeB wzy/VUbQ2GQfVDB0bcjWQA6VvmNsNIC4KpT0efEdTEQnSBanNzRsMjZ/7BGxs8kPcgkj prtzvH84dOfcNh4m0LNvSCqbQIxuEjlxVyw1kTbdi8RTCtBtIRfzRDOAWsPdvmGKx3h1 rj1S0KQuv74WYM/UBwDSK6ieu7qOVNb7ZjUmGPmJQNU+CDcLRAlM1EOPZs3pI9AJixSW HCcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vcfhsapg; 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 i20-20020ac860d4000000b003b645a4dfe7si1935029qtm.771.2023.01.24.10.07.49 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jan 2023 10:07:49 -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=Vcfhsapg; 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 1pKNhc-0005Gs-7d; Tue, 24 Jan 2023 13:07:24 -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 1pKNhI-0004zZ-0I for qemu-devel@nongnu.org; Tue, 24 Jan 2023 13:07:04 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) 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 1pKNhE-000745-5U for qemu-devel@nongnu.org; Tue, 24 Jan 2023 13:07:03 -0500 Received: by mail-wr1-x42d.google.com with SMTP id h16so14702879wrz.12 for <qemu-devel@nongnu.org>; Tue, 24 Jan 2023 10:06:59 -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=VcfhsapgAqIuVGUBppvmxX0rDEi5T07SCnXSbt+ILThlbqIkp+R9km33EImmtlf0Q1 h+7yXCdpYuNdtUphFC7xMpqCtTteHI+fs2MoNfX7rNcyuQjzfQ5jPV6E+QUQG79WDrpJ vPf2RxliY4YoVRfcMqpRdrcMVwwz9EnJv2b4LQX4bj3EuGYyqa4cvGHOgQsBvg0WgBGz 2HC/p1IWP3zUgiXBIuSrDr/LBmJ9mMEfSIlnk3kSBwV9zuVwpVAUECtP69j9wiysqHGv zdaJ/KQtVjKB3+NH2t84f8f6M/KdtnFZc+TozDNxeB8NA2rgP0zh7DC/e56UGhvuY00B r8LQ== 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=WK3Lta/eHcZdJpJlEtYeKiLHk9BgXh7xIV4XJ+PY6Q4baqc+gxYC+dYcQMwf6hh6f5 nqJ+/+3jwE+SWMviM1fMc04p0z0nErrVRZ7/q1smtCazlMpF/1MZb7QqTnfDuH88XAsS kKlCZiFP+MSDVuKj8O81ok0hmGJmSGy79B173w2UABxZkNNzd0TgedCN6AHDjBctn3/+ 7qtBjFK+i+CYERpVRo5P6nECrHoEsXrDEkziM4RRTnat9g2L4tAz3sm6go3JbU71m4iV tCY5+6nOMO6vQY8cd7BkYOL3NYu3x+ypeVujamVU+Wkhu5SSWLgp71Kqo8a+3mtiGYEf Zgig== X-Gm-Message-State: AFqh2kqq2NF1nqMifj5V+FjbUh9pGWAJk/6EjEihYPoaBOxig2pYhXxy YrBBPMPGcRqAMuLHInGYPeNBMg== X-Received: by 2002:a5d:55c5:0:b0:242:3812:f948 with SMTP id i5-20020a5d55c5000000b002423812f948mr34064351wrw.24.1674583618856; Tue, 24 Jan 2023 10:06:58 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id y4-20020adfd084000000b0028e55b44a99sm2366949wrh.17.2023.01.24.10.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 10:06:56 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 959431FFCC; Tue, 24 Jan 2023 18:01:30 +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>, Ed Maste <emaste@freebsd.org>, Thomas Huth <thuth@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Markus Armbruster <armbru@redhat.com>, Jagannathan Raman <jag.raman@oracle.com>, John G Johnson <john.g.johnson@oracle.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= <berrange@redhat.com>, Bandan Das <bsd@redhat.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Michael Roth <michael.roth@amd.com>, Eduardo Habkost <eduardo@habkost.net>, Beraldo Leal <bleal@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Stefan Hajnoczi <stefanha@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, John Snow <jsnow@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, qemu-arm@nongnu.org, Yanan Wang <wangyanan55@huawei.com>, Cleber Rosa <crosa@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Peter Maydell <peter.maydell@linaro.org>, Evgeny Iakovlev <eiakovlev@linux.microsoft.com>, Bin Meng <bmeng.cn@gmail.com> Subject: [PATCH v2 24/35] semihosting: add O_BINARY flag in host_open for NT compatibility Date: Tue, 24 Jan 2023 18:01:16 +0000 Message-Id: <20230124180127.1881110-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230124180127.1881110-1-alex.bennee@linaro.org> References: <20230124180127.1881110-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::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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=unavailable 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 |
maintainer tree pre-PR (testing/docs/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;