Re: [PATCH v3 5/5] mtdinfo: consolidate help as display_help()

Brian Norris
2011-08-12T16:37:45Z

On Fri, Aug 12, 2011 at 12:06 AM, Brian Foster
<brian.foster@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