parser: Do not print prompt if input buffer is not empty

Do not print a prompt if there is still input left over in the
input buffer.

Add a noinline attribute to setprompt while doing this as otherwise
gcc will produce horrendous output.

Reported-by: Vincent Lefevre <vincent@vinc17.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 file changed