[git commit branch/1_31_stable] ash: fix set -o to not show "nameless" options

Denys Vlasenko vda.linux at googlemail.com
Mon Oct 21 14:54:40 UTC 2019


commit: https://git.busybox.net/busybox/commit/?id=244c0ebb4f71fb9f400d2242bbdeaca0c138c547
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_31_stable

Patch by Martijn Dekker <martijn at inlv.org>

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/ash.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shell/ash.c b/shell/ash.c
index c0352602b..305fb6348 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11091,6 +11091,8 @@ plus_minus_o(char *name, int val)
 		return 1;
 	}
 	for (i = 0; i < NOPTS; i++) {
+		if (optnames(i)[0] == '\0')
+			continue;
 		if (val) {
 			out1fmt("%-16s%s\n", optnames(i), optlist[i] ? "on" : "off");
 		} else {


More information about the busybox-cvs mailing list