Re: [PATCH] doc: du - clarify default blocksize in usage/manpage
From:
Ondřej Vašík
Subject:
Re: [PATCH] doc: du - clarify default blocksize in usage/manpage
Date:
Wed, 09 Sep 2009 17:55:27 +0200
Jim Meyering wrote:
> Eric Blake wrote:
> > This repetition begs for a helper method in system.h. It would look better
> > like:
> >
> > emit_blocksize (program_name);
>
> I agree.
> Though please call it something like "emit_blocksize_note"
> so it's name doesn't imply it's printing a bare number.
>
> > where emit_blocksize takes care of converting program_name to uppercase in
> > its
> > spelling of %s_BLOCKSIZE.
Called emit_blocksize_note(), I don't think it is good to rely on
program_name variable and convert it internally to uppercased string -
as those envvars are not program_name dependent.
So I called emit_blocksize_note with constant string (uppercased).
Additionally I factored out duplicities about SIZE's - to same function
in system.h
Greetings,
Ondřej Vašík