← Commit list

2a6d29ad5

Denys Vlasenko
Denys Vlasenko
2016-10-25
SUCCESS Duration: 255s

Subject

ash: [PARSER] Do not show prompts in expandstr

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+6 -0
@@ -12276,11 +12276,17 @@ static const char *
expandstr(const char *ps)
{
union node n;
+ int saveprompt;
/* XXX Fix (char *) cast. It _is_ a bug. ps is variable's value,
* and token processing _can_ alter it (delete NULs etc). */
setinputstring((char *)ps);
+
+ saveprompt = doprompt;
+ doprompt = 0;
readtoken1(pgetc(), PSSYNTAX, nullstr, 0);
+ doprompt = saveprompt;
+
popfile();
n.narg.type = NARG;