public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux Date: Mon, 16 Jan 2023 20:41:45 +0000 (GMT) [thread overview] Message-ID: <20230116204145.057033858D32@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=49b52521f3fd91068d9b055dac2d90a5f2e97193 commit 49b52521f3fd91068d9b055dac2d90a5f2e97193 Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Mon Jan 16 21:40:59 2023 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Mon Jan 16 21:40:59 2023 +0100 Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/fhandler/proc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc index b7f29b23d5ee..6a9139861244 100644 --- a/winsup/cygwin/fhandler/proc.cc +++ b/winsup/cygwin/fhandler/proc.cc @@ -659,8 +659,6 @@ format_proc_cpuinfo (void *, char *&destbuf) __small_swprintf (cpu_num_p, L"%d", cpu_number); if (!NT_SUCCESS (RtlCheckRegistryKey (RTL_REGISTRY_ABSOLUTE, cpu_key))) break; - if (cpu_number) - print ("\n"); WORD cpu_group = cpu_number / num_cpu_per_group; KAFFINITY cpu_mask = 1L << (cpu_number % num_cpu_per_group); @@ -1704,6 +1702,8 @@ format_proc_cpuinfo (void *, char *&destbuf) print ("\n"); } + print ("\n"); + destbuf = (char *) crealloc_abort (destbuf, bufptr - buf); memcpy (destbuf, buf, bufptr - buf); return bufptr - buf;
reply other threads:[~2023-01-16 20:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230116204145.057033858D32@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).