diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-06 14:02:05 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-06 14:02:05 +0200 |
| commit | 40c2d01da2ebfccf060a487f946bc79df0d33011 (patch) | |
| tree | c30fb140091dc81f232cbc1111556bf2e8863483 /libbb | |
| parent | 8bde71eb1502a5cdf186769b47d470038f99bc95 (diff) | |
| download | busybox-w32-40c2d01da2ebfccf060a487f946bc79df0d33011.tar.gz busybox-w32-40c2d01da2ebfccf060a487f946bc79df0d33011.tar.bz2 busybox-w32-40c2d01da2ebfccf060a487f946bc79df0d33011.zip | |
libbb: make read_cmdline() replace chars 1..31 with '?', not space
Space was too inconspicuous on output
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/procps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index fc31c075d..94bbd9eb5 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
| @@ -578,7 +578,7 @@ int FAST_FUNC read_cmdline(char *buf, int col, unsigned pid, const char *comm) | |||
| 578 | */ | 578 | */ |
| 579 | while (sz >= 0) { | 579 | while (sz >= 0) { |
| 580 | if ((unsigned char)(buf[sz]) < ' ') | 580 | if ((unsigned char)(buf[sz]) < ' ') |
| 581 | buf[sz] = ' '; | 581 | buf[sz] = (buf[sz] ? /*ctrl*/'?' : /*NUL*/' '); |
| 582 | sz--; | 582 | sz--; |
| 583 | } | 583 | } |
| 584 | 584 | ||
