coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] [PATCH] stat: optimize and translate default format stri


From: Jim Meyering
Subject: Re: [coreutils] [PATCH] stat: optimize and translate default format strings
Date: Fri, 01 Oct 2010 22:44:39 +0200

Eric Blake wrote:
> * src/stat.c (main): Hoist default format computation out of loop.
> (do_statfs, do_stat): Move default format generation...
> (default_format): ...into new function.  Allocate the result in
> pieces, rather than repeating mostly-similar chunks.  Allow
> translation of verbose format.  Pass a second format to do_stat,
> for the one aspect of the default format that is conditional on
> file type.
> * NEWS: Document the translation aspect.
> ---
>
>> Hmm, in looking at this, I'm wondering if an even better patch would
>> be to build the default format string incrementally, using asnprintf,
>> rather than repeating so many lines.
>
> Like this, and I'll rebase the -Z vs. %C patch on top of this.
>
> This one should be uncontroversial, but just to be safe: OK to push?

Yes.
Thank you for the factoring.
Did you do any before/after testing, to be sure that nothing changed?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]