procps-ng/sysctl-nameonly-shows-value.patch
Jan Rybar bb7dd506fa sysctl -N shows values instead of names
Resolves: rhbz#2222056
2023-08-03 13:45:52 +02:00

13 lines
453 B
Diff

diff -up ./sysctl.c.old ./sysctl.c
--- ./sysctl.c.old 2023-07-20 14:43:10.271856721 +0200
+++ ./sysctl.c 2023-07-21 14:50:39.792368077 +0200
@@ -578,7 +578,7 @@ static int WriteSetting(
}
if ((rc == EXIT_SUCCESS && !Quiet) || DryRun) {
if (NameOnly) {
- printf("%s\n", value);
+ printf("%s\n", dotted_key);
} else {
if (PrintName) {
printf("%s = %s\n", dotted_key, value);