pkgdb: foreach_xxx_pkg_cb -> foreach_xxx_cb.

This commit is contained in:
Juan RP 2012-01-21 10:30:20 +01:00
parent 4758635f15
commit 38db570c19
10 changed files with 16 additions and 16 deletions

View File

@ -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",

View File

@ -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) {

View File

@ -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) {
/*

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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);
}

View File

@ -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;