public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux
@ 2023-01-16 20:41 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-01-16 20:41 UTC (permalink / raw)
  To: cygwin-cvs

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-16 20:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 20:41 [newlib-cygwin/main] Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux Corinna Vinschen

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).