[PATCH v3 5/5] mtdinfo: consolidate help as display_help()
Brian Norris
computersforpeace at gmail.com
Fri Aug 12 12:37:40 EDT 2011
On Fri, Aug 12, 2011 at 12:06 AM, Brian Foster
<brian.foster at maxim-ic.com> wrote:
>> + "Examples:\n"
>> + " %1$s /dev/mtd0 print information MTD device /dev/mtd0\n"
>> + " %1$s /dev/mtd0 -u print information MTD device /dev/mtd0\n"
>> + "\t\t\t\tand include UBI layout information\n"
>
> Any reason this line, and only this line,
> uses tabs (\t) for formatting whilst every
> other line uses spaces? (FWIW, I prefer
> spaces, but more importantly think there
> should be some consistency.)
Yes, sort of. It's used to be because we "don't know" the length of
the "%1$s" strings (i.e., the PROGRAM_NAME macro, which here is just
"mtdinfo"). I suppose we could either hardcode the spaces in or try to
do some sort of "ARRAY_SIZE" trickery (as found in the Linux kernel)
to find the length of PROGRAM_NAME. I'll see how the second option
works (for a potential v4 patch?) unless someone objects.
> Yes, this is pedantic trivia! ;-)
Still a valid question...in fact, this was something I had meant to
reconsider before sending this patch, but I forgot :)
Brian
More information about the linux-mtd
mailing list