lib: change xbps_dbg_printf to not require xbps_handle
This allows to simplify a lot of code by not having to pass around the xbps handle everywhere just to print some debug information.
This commit is contained in:
@@ -146,7 +146,7 @@ repo_match_cb(struct xbps_handle *xhp,
|
||||
assert(bfile);
|
||||
filesd = xbps_archive_fetch_plist(bfile, "/files.plist");
|
||||
if (filesd == NULL) {
|
||||
xbps_dbg_printf(xhp, "%s: couldn't fetch files.plist from %s: %s\n",
|
||||
xbps_dbg_printf("%s: couldn't fetch files.plist from %s: %s\n",
|
||||
pkgver, bfile, strerror(errno));
|
||||
return EINVAL;
|
||||
}
|
||||
|
@@ -296,7 +296,7 @@ cat_file(struct xbps_handle *xhp, const char *pkg, const char *file)
|
||||
if (url == NULL)
|
||||
return EINVAL;
|
||||
|
||||
xbps_dbg_printf(xhp, "matched pkg at %s\n", url);
|
||||
xbps_dbg_printf("matched pkg at %s\n", url);
|
||||
rv = xbps_archive_fetch_file_into_fd(url, file, STDOUT_FILENO);
|
||||
free(url);
|
||||
return rv;
|
||||
@@ -317,7 +317,7 @@ repo_cat_file(struct xbps_handle *xhp, const char *pkg, const char *file)
|
||||
if (url == NULL)
|
||||
return EINVAL;
|
||||
|
||||
xbps_dbg_printf(xhp, "matched pkg at %s\n", url);
|
||||
xbps_dbg_printf("matched pkg at %s\n", url);
|
||||
rv = xbps_archive_fetch_file_into_fd(url, file, STDOUT_FILENO);
|
||||
free(url);
|
||||
return rv;
|
||||
|
Reference in New Issue
Block a user