kernel/ddb: Fix formatting when printing command tables.
authorSascha Wildner <saw@online.de>
Thu, 5 Sep 2013 20:38:10 +0000 (22:38 +0200)
committerSascha Wildner <saw@online.de>
Thu, 5 Sep 2013 20:38:10 +0000 (22:38 +0200)
commit3734708d4840aa98ed8d7fb80e64a46c8b0b5cdf
tree9b56b018e4c40bf79e56a6dfa9f345eb8faba667
parent748810ccf3aefaa27ff22ca5be59e2e5c237b26c
kernel/ddb: Fix formatting when printing command tables.

FreeBSD's r163134:

Fixed formatting of printing of command tables.  With the default max
output width of 79, only 6 columns of width 12 each fit, but 7 columns
were printed.

The fix is to pass the width of the next output to db_end_line() and
not assume there that this width is always 1.

Related unfixed bugs:
- 1 character is wasted for a space after the last column
- suppression of trailing spaces used to limit the misformatting, but
  seems to have been lost
- in db_examine(), the width of the next output is not known and is
  still assumed to be 1.

Taken-from: FreeBSD
sys/ddb/db_command.c
sys/ddb/db_examine.c
sys/ddb/db_output.c
sys/ddb/db_output.h