From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Yonggang Luo <luoyonggang@gmail.com>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 1/2] gcrypt: test_tls_psk_init should write binary file instead text file.
Date: Tue, 13 Oct 2020 12:52:11 +0200 [thread overview]
Message-ID: <499ceebd-20a6-057b-ae77-133fa1a8da10@redhat.com> (raw)
In-Reply-To: <20201013010310.497-2-luoyonggang@gmail.com>
On 10/13/20 3:03 AM, Yonggang Luo wrote:
> On windows, if open file with "w", it's will automatically convert
> "\n" to "\r\n" when writing to file.
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> tests/crypto-tls-psk-helpers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/crypto-tls-psk-helpers.c b/tests/crypto-tls-psk-helpers.c
> index a8395477c3..11ae26368c 100644
> --- a/tests/crypto-tls-psk-helpers.c
> +++ b/tests/crypto-tls-psk-helpers.c
> @@ -32,7 +32,7 @@ void test_tls_psk_init(const char *pskfile)
> {
> FILE *fp;
>
> - fp = fopen(pskfile, "w");
> + fp = fopen(pskfile, "wb");
> if (fp == NULL) {
> g_critical("Failed to create pskfile %s", pskfile);
> abort();
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
next prev parent reply other threads:[~2020-10-13 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 1:03 [PATCH 0/2] Fixes gcrypt testing on msys2/mingw Yonggang Luo
2020-10-13 1:03 ` [PATCH 1/2] gcrypt: test_tls_psk_init should write binary file instead text file Yonggang Luo
2020-10-13 10:52 ` Philippe Mathieu-Daudé [this message]
2020-10-13 1:03 ` [PATCH 2/2] gcrypt: Enable crypto tests under msys2/mingw Yonggang Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=499ceebd-20a6-057b-ae77-133fa1a8da10@redhat.com \
--to=philmd@redhat.com \
--cc=berrange@redhat.com \
--cc=luoyonggang@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).