public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: getconf: align -a output to glibc getconf
@ 2022-03-02 21:15 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-03-02 21:15 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=35ba7d147df8df56ef92ea296443d2732ece0445
commit 35ba7d147df8df56ef92ea296443d2732ece0445
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Mar 2 22:15:02 2022 +0100
Cygwin: getconf: align -a output to glibc getconf
glibc getconf doesn't print "undefined" for undefined values
in -a output. It just prints the empty string. Do it the
same way.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/utils/getconf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/utils/getconf.c b/winsup/utils/getconf.c
index bc37bfb47..88deddd38 100644
--- a/winsup/utils/getconf.c
+++ b/winsup/utils/getconf.c
@@ -481,7 +481,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
{
if (a_flag && errno != 0)
return; /* Just skip invalid variables */
- print_strvar (cp->name, "undefined");
+ print_strvar (cp->name, a_flag ? "" : "undefined");
}
else
print_longvar (cp->name, val);
@@ -493,7 +493,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
{
if (a_flag && errno != 0)
return; /* Just skip invalid variables */
- print_strvar (cp->name, "undefined");
+ print_strvar (cp->name, a_flag ? "" : "undefined");
}
else
print_longvar (cp->name, val);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-02 21:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 21:15 [newlib-cygwin] Cygwin: getconf: align -a output to glibc getconf 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).