Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

properly extract name from alpm_backup_t

  • Loading branch information...
commit 8af5f3ab5ebbab172c943db25d381137aaaed452 1 parent d64d038
Dave Reisner authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 expac.c
8 expac.c
View
@@ -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('%');
Please sign in to comment.
Something went wrong with that request. Please try again.