« Previous | Next » 

Revision 63ec54d7

ID63ec54d7b319824df8b60cfe25afdfb607ce3905

Added by Peter Maydell about 11 years ago

linux-user: Fix layout of usage table to account for option text

The linux-user usage message attempts to line up the columns in
its table by calculating the maximum width of any item in them.
However for the 'Argument' column it was only accounting for the
length of the option switch (eg "-d"), not the additional example
text (eg "item[,...]"). This currently has no adverse effects
because the widest item in the column happens to be the argumentless
"-singlestep" option, but improving the "-d" option help to read
"-d item[,...]" exceeds that limit.

Fix this by correctly calculating maxarglen as the width of the
first column text including a possible option argument, and
adjusting its uses to match.

Signed-off-by: Peter Maydell <>
Signed-off-by: Riku Voipio <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences