diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-06-05 13:33:32 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-06-05 13:33:32 -0400 |
commit | 8af5f3ab5ebbab172c943db25d381137aaaed452 (patch) | |
tree | f26c82c3d63db7ee1398ef08a02787ce1aa925b6 | |
parent | d64d0381f285bdf86951e3d4decc95bec5bfc21f (diff) | |
download | expac-8af5f3ab5ebbab172c943db25d381137aaaed452.tar.xz |
properly extract name from alpm_backup_t
-rw-r--r-- | expac.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -69,6 +69,12 @@ int pkgcounter = 0; typedef const char *(*extractfn)(void*); +static const char *alpm_backup_get_name(void *b) +{ + alpm_backup_t *bkup = b; + return bkup->name; +} + static double humanize_size(off_t bytes, const char target_unit, const char **label) { static const char *labels[] = {"B", "KiB", "MiB", "GiB", @@ -546,7 +552,7 @@ static int print_pkg(alpm_pkg_t *pkg, const char *format) { out += print_list(alpm_pkg_get_replaces(pkg), NULL, shortdeps); break; case 'B': /* backup */ - out += print_list(alpm_pkg_get_backup(pkg), NULL, shortdeps); + out += print_list(alpm_pkg_get_backup(pkg), alpm_backup_get_name, shortdeps); break; case '%': putchar('%'); |