[pacman-dev] [PATCH 3/6] --print-format displays size in bytes
Dan McGee
dpmcgee at gmail.com
Fri Feb 25 09:52:18 EST 2011
On Mon, Feb 21, 2011 at 1:02 PM, Jakob Gruber <jakob.gruber at gmail.com> wrote:
> Printing the exact size seems to make more sense for scripting contexts
> and allows us to get rid of the direct call to
> size_to_human_string_format.
Agreed.
Signed-off-by: Dan McGee <dan at archlinux.org>
> Signed-off-by: Jakob Gruber <jakob.gruber at gmail.com>
> ---
> src/pacman/util.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/pacman/util.c b/src/pacman/util.c
> index b651478..8903d61 100644
> --- a/src/pacman/util.c
> +++ b/src/pacman/util.c
> @@ -703,7 +703,7 @@ void print_packages(const alpm_list_t *packages)
> /* %s : size */
> if(strstr(temp,"%s")) {
> char *size;
> - size = size_to_human_string_format(pkg_get_size(pkg), "%.2f", "M", 0);
> + pm_asprintf(&size, "%u", pkg_get_size(pkg));
> string = strreplace(temp, "%s", size);
> free(size);
> free(temp);
> --
> 1.7.4.1
>
>
>
More information about the pacman-dev
mailing list