Code review comment for lp://qastaging/~csurbhi/ubuntu/natty/plymouth/plymouth.bug-fix566818

Revision history for this message
Surbhi Palande (csurbhi) wrote :

Hi Steve,

Thanks a lot for reviewing the code. Here is what I thought:

1) If the prompt accidentally ends in a "\n" (which ideally it should not and I dont have an example thankfully to show this :), but if it does anyway), then the repetition of the prompt wont be fixed. Every other plugin can handle the case where there is a "\n" at the end except for the details plugin. So not printing the last character -'\n' in this special (probably a never should happen) is to prevent the case where a prompt does not appear and bullets get repeated. This will be very difficult for someone to debug - very non intuitive:
Eg: prompt: "Enter \n passphrase \n"

What gets printed is:
Enter
passphrase:
* (on next keystroke this is then cleared and \n is printed)
** (on next keystroke this is then cleared and \n is printed)
***
and so on!

Removing the last '\n' would rather print:
Enter
passphrase: ***

Please do let me know what you think!
I will make a separate patch of the ':'. Indeed that will be better to comprehend.

« Back to merge proposal