libxbps: require a pointer to xbps_handle in functions that need it.

This removes 2 global vars from lib/initend.c and easier to know
what functions require access to xbps_handle.
This commit is contained in:
Juan RP
2012-06-14 08:22:11 +02:00
parent a3adbcda95
commit 3e9e87fc2a
60 changed files with 1143 additions and 901 deletions

View File

@@ -35,11 +35,13 @@
#include "defs.h"
int
show_pkg_info_from_metadir(const char *pkgname, const char *option)
show_pkg_info_from_metadir(struct xbps_handle *xhp,
const char *pkgname,
const char *option)
{
prop_dictionary_t d;
d = xbps_dictionary_from_metadata_plist(pkgname, XBPS_PKGPROPS);
d = xbps_dictionary_from_metadata_plist(xhp, pkgname, XBPS_PKGPROPS);
if (d == NULL)
return EINVAL;
@@ -53,12 +55,12 @@ show_pkg_info_from_metadir(const char *pkgname, const char *option)
}
int
show_pkg_files_from_metadir(const char *pkgname)
show_pkg_files_from_metadir(struct xbps_handle *xhp, const char *pkgname)
{
prop_dictionary_t d;
int rv = 0;
d = xbps_dictionary_from_metadata_plist(pkgname, XBPS_PKGFILES);
d = xbps_dictionary_from_metadata_plist(xhp, pkgname, XBPS_PKGFILES);
if (d == NULL)
return EINVAL;