diff --git a/bin/xbps-bin/check.c b/bin/xbps-bin/check.c index 472cadad..9aee5585 100644 --- a/bin/xbps-bin/check.c +++ b/bin/xbps-bin/check.c @@ -68,7 +68,7 @@ check_pkg_integrity_all(void) int rv; memset(&cpkg, 0, sizeof(cpkg)); - (void)xbps_pkgdb_foreach_pkg_cb(cb_pkg_integrity, &cpkg); + (void)xbps_pkgdb_foreach_cb(cb_pkg_integrity, &cpkg); if (cpkg.flush) { if ((rv = xbps_pkgdb_update(xhp, true)) != 0) { xbps_error_printf("failed to write pkgdb: %s\n", diff --git a/bin/xbps-bin/check_pkg_requiredby.c b/bin/xbps-bin/check_pkg_requiredby.c index 78438b93..da33373d 100644 --- a/bin/xbps-bin/check_pkg_requiredby.c +++ b/bin/xbps-bin/check_pkg_requiredby.c @@ -163,7 +163,7 @@ check_pkg_requiredby(const char *pkgname, void *arg, bool *pkgdb_update) crd.pkgdb_update = false; prop_dictionary_get_cstring_nocopy(crd.pkgd, "pkgver", &crd.pkgver); - rv = xbps_pkgdb_foreach_pkg_cb(check_reqby_pkg_cb, &crd); + rv = xbps_pkgdb_foreach_cb(check_reqby_pkg_cb, &crd); *pkgdb_update = crd.pkgdb_update; if (crd.pkgdb_update) { diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index 4e8c11c5..daf70047 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -203,7 +203,7 @@ main(int argc, char **argv) * Find the longest pkgver string to pretty print the output. */ lpc.pkgver_len = find_longest_pkgver(NULL); - rv = xbps_pkgdb_foreach_pkg_cb(list_pkgs_in_dict, &lpc); + rv = xbps_pkgdb_foreach_cb(list_pkgs_in_dict, &lpc); if (rv == ENOENT) { printf("No packages currently registered.\n"); rv = 0; @@ -342,7 +342,7 @@ main(int argc, char **argv) if (argc != 1) usage(); - rv = xbps_pkgdb_foreach_pkg_cb(list_manual_pkgs, NULL); + rv = xbps_pkgdb_foreach_cb(list_manual_pkgs, NULL); } else if (strcasecmp(argv[0], "show-revdeps") == 0) { /* diff --git a/bin/xbps-bin/util.c b/bin/xbps-bin/util.c index dfc43a0e..277f9476 100644 --- a/bin/xbps-bin/util.c +++ b/bin/xbps-bin/util.c @@ -187,7 +187,7 @@ find_longest_pkgver(prop_object_t o) (void)xbps_callback_array_iter(o, _find_longest_pkgver_cb, &len); else - (void)xbps_pkgdb_foreach_pkg_cb( + (void)xbps_pkgdb_foreach_cb( _find_longest_pkgver_cb, &len); return len; diff --git a/include/xbps_api.h b/include/xbps_api.h index 7411b100..d1180b64 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -668,8 +668,8 @@ prop_array_t xbps_find_pkg_orphans(prop_array_t orphans); * @return 0 on success (all objects were processed), otherwise * the value returned by the function callback. */ -int xbps_pkgdb_foreach_pkg_cb(int (*fn)(prop_object_t, void *, bool *), - void *arg); +int xbps_pkgdb_foreach_cb(int (*fn)(prop_object_t, void *, bool *), + void *arg); /** * Executes a function callback per a package dictionary registered @@ -681,7 +681,7 @@ int xbps_pkgdb_foreach_pkg_cb(int (*fn)(prop_object_t, void *, bool *), * @return 0 on success (all objects were processed), otherwise * the value returned by the funcion callback. */ -int xbps_pkgdb_foreach_reverse_pkg_cb( +int xbps_pkgdb_foreach_reverse_cb( int (*fn)(prop_object_t, void *, bool *), void *arg); diff --git a/lib/package_configure.c b/lib/package_configure.c index 2ea1338b..c7b1a1c1 100644 --- a/lib/package_configure.c +++ b/lib/package_configure.c @@ -65,7 +65,7 @@ xbps_configure_packages(bool flush) struct xbps_handle *xhp = xbps_handle_get(); int rv; - rv = xbps_pkgdb_foreach_pkg_cb(configure_pkgs_cb, NULL); + rv = xbps_pkgdb_foreach_cb(configure_pkgs_cb, NULL); if (rv == 0 && flush) rv = xbps_pkgdb_update(xhp, true); diff --git a/lib/package_orphans.c b/lib/package_orphans.c index a8483b6a..dc2f096d 100644 --- a/lib/package_orphans.c +++ b/lib/package_orphans.c @@ -180,7 +180,7 @@ xbps_find_pkg_orphans(prop_array_t orphans_user) * order in which packages were installed. */ od.orphans_user = orphans_user; - rv = xbps_pkgdb_foreach_reverse_pkg_cb(find_orphan_pkg, &od); + rv = xbps_pkgdb_foreach_reverse_cb(find_orphan_pkg, &od); if (rv != 0) { errno = rv; prop_object_release(od.array); diff --git a/lib/package_requiredby.c b/lib/package_requiredby.c index 79b92016..7743eded 100644 --- a/lib/package_requiredby.c +++ b/lib/package_requiredby.c @@ -103,7 +103,7 @@ int HIDDEN xbps_requiredby_pkg_remove(const char *pkgname) { assert(pkgname != NULL); - return xbps_pkgdb_foreach_pkg_cb(remove_pkg_from_reqby, __UNCONST(pkgname)); + return xbps_pkgdb_foreach_cb(remove_pkg_from_reqby, __UNCONST(pkgname)); } int HIDDEN diff --git a/lib/pkgdb.c b/lib/pkgdb.c index 48cb3094..65e50795 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -163,15 +163,15 @@ foreach_pkg_cb(int (*fn)(prop_object_t, void *, bool *), } int -xbps_pkgdb_foreach_reverse_pkg_cb(int (*fn)(prop_object_t, void *, bool *), - void *arg) +xbps_pkgdb_foreach_reverse_cb(int (*fn)(prop_object_t, void *, bool *), + void *arg) { return foreach_pkg_cb(fn, arg, true); } int -xbps_pkgdb_foreach_pkg_cb(int (*fn)(prop_object_t, void *, bool *), - void *arg) +xbps_pkgdb_foreach_cb(int (*fn)(prop_object_t, void *, bool *), + void *arg) { return foreach_pkg_cb(fn, arg, false); } diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index a9c966cc..93d988b2 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -227,7 +227,7 @@ xbps_transaction_update_packages(void) bool newpkg_found = false; int rv; - rv = xbps_pkgdb_foreach_pkg_cb(update_pkgs_cb, &newpkg_found); + rv = xbps_pkgdb_foreach_cb(update_pkgs_cb, &newpkg_found); if (!newpkg_found) rv = EEXIST;