[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?
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, (continued)
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, Pádraig Brady, 2010/10/05
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, Jim Meyering, 2010/10/05
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, Pádraig Brady, 2010/10/05
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, Eric Blake, 2010/10/05
- Re: [coreutils] [PATCHv2] stat: print SELinux context when available, Jim Meyering, 2010/10/05
- [coreutils] [PATCH] stat: drop %C support when printing file system details, Eric Blake, 2010/10/05
- Re: [coreutils] [PATCH] stat: drop %C support when printing file system details, Eric Blake, 2010/10/05
- Re: [coreutils] [PATCH] stat: drop %C support when printing file system details, Jim Meyering, 2010/10/05
- Re: [coreutils] [PATCH] stat: optimize and translate default format strings,
Jim Meyering <=
- Re: [coreutils] [PATCH] stat: optimize and translate default format strings, Eric Blake, 2010/10/01
- Re: [coreutils] [PATCH] stat: optimize and translate default format strings, Jim Meyering, 2010/10/01