diff options
Diffstat (limited to 'src/info.c')
-rw-r--r-- | src/info.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -179,12 +179,16 @@ static void info_print_license(struct apk_database *db, struct apk_package *pkg) static void info_print_size(struct apk_database *db, struct apk_package *pkg) { + off_t size; + const char *size_unit; + + size_unit = apk_get_human_size(pkg->installed_size, &size); if (apk_verbosity > 1) - printf("%s: %zu", pkg->name->name, pkg->installed_size); + printf("%s: %lld %s", pkg->name->name, + (long long)size, size_unit); else - printf(PKG_VER_FMT " installed size:\n%zu\n", - PKG_VER_PRINTF(pkg), - pkg->installed_size); + printf(PKG_VER_FMT " installed size:\n%lld %s\n", + PKG_VER_PRINTF(pkg), (long long)size, size_unit); } static void info_print_dep_array(struct apk_database *db, struct apk_package *pkg, |