vzlist: do not print spaces at end-of-line
Just remove the spaces at EOL before printing a line. This
looks like a dirty hack and indeed it is...
The "proper" solution would be to fix all the print_xxx()
functions that use "%-10s" like format (including print_hdr())
to add a check for is_last_field and do not set field width
if this is the last field. This would be a real PITA and make
the code more messy. So in this particular rare case I vote
for the hack.
Example utput before this patch (sed is used to mark EOL):
CTID STATUS |
160 running |
992 running |
and after:
CTID STATUS|
160 running|
992 running|
http://bugzilla.openvz.org/1419
Reported-by: Àrea de Sistemes, ITI <asi-openvz@iti.upv.es>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed