From 8af5f3ab5ebbab172c943db25d381137aaaed452 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 5 Jun 2012 13:33:32 -0400 Subject: properly extract name from alpm_backup_t --- expac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/expac.c b/expac.c index eee5fbc..84a7081 100644 --- a/expac.c +++ b/expac.c @@ -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('%'); -- cgit v1.2.3-70-g09d2