diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-03-03 00:15:02 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-03-03 00:15:02 +0300 |
commit | 35ba7d147df8df56ef92ea296443d2732ece0445 (patch) | |
tree | 090f38e15d5d1bea7738f1f3368bc975bda027de | |
parent | fcec4830abf0aa4821ba1a5dd1d9fb35d671cb85 (diff) |
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>
-rw-r--r-- | winsup/utils/getconf.c | 4 |
1 files 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); |