getty: fix regression introduced in 5342881
getty: fix regression introduced in 5342881

Replacing write() with dprint() without thinking leads to duplicate
output in getty.  In particular '\n login: foo login: ".

Must check if length is > 0, or dprint() will calculate it on its own.

Signed-off-by: Joachim Wiberg <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>

troglobit/finit,troglobit/finit