summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-06-05 13:33:32 -0400
committerDave Reisner <dreisner@archlinux.org>2012-06-05 13:33:32 -0400
commit8af5f3ab5ebbab172c943db25d381137aaaed452 (patch)
treef26c82c3d63db7ee1398ef08a02787ce1aa925b6
parentd64d0381f285bdf86951e3d4decc95bec5bfc21f (diff)
downloadexpac-8af5f3ab5ebbab172c943db25d381137aaaed452.tar.xz
properly extract name from alpm_backup_t
-rw-r--r--expac.c8
1 files changed, 7 insertions, 1 deletions
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('%');