diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-01-16 21:40:59 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-01-16 21:41:13 +0100 |
commit | 39db1a7f423b5ddfdc5a8ce484757448d8e4f9d6 (patch) | |
tree | 20c779c267bc3825f6157b0c55604a314a96e27d | |
parent | 7c870ee90f7c0f8264b58cf43616fa754993b9d1 (diff) | |
download | newlib-39db1a7f423b5ddfdc5a8ce484757448d8e4f9d6.zip newlib-39db1a7f423b5ddfdc5a8ce484757448d8e4f9d6.tar.gz newlib-39db1a7f423b5ddfdc5a8ce484757448d8e4f9d6.tar.bz2 |
Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/fhandler/proc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc index 6627212..92bcc56 100644 --- a/winsup/cygwin/fhandler/proc.cc +++ b/winsup/cygwin/fhandler/proc.cc @@ -660,8 +660,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); @@ -1701,6 +1699,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; |