From: Michael Schroeder Date: Mon, 15 Apr 2013 12:55:48 +0000 (+0200) Subject: some other perror->pool_error changes X-Git-Tag: BASE-SuSE-Code-12_3-Branch~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=382d248f57177c7c4f5a552d23acdbffca8c9855;p=thirdparty%2Flibsolv.git some other perror->pool_error changes --- diff --git a/ext/repo_products.c b/ext/repo_products.c index 1994e7ae..4609ceb9 100644 --- a/ext/repo_products.c +++ b/ext/repo_products.c @@ -384,7 +384,7 @@ add_code11_product(struct parsedata *pd, FILE *fp) else { pd->currentproduct = pd->baseproduct + 1; /* make it != baseproduct if stat fails */ - perror("fstat"); + pool_error(pd->pool, 0, "fstat: %s", strerror(errno)); pd->ctime = 0; } @@ -461,7 +461,7 @@ repo_add_code11_products(Repo *repo, const char *dirpath, int flags) fp = fopen(fullpath, "r"); if (!fp) { - perror(fullpath); + pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno)); continue; } pd.filename = fullpath; diff --git a/ext/repo_releasefile_products.c b/ext/repo_releasefile_products.c index 5c8ec332..a40bc984 100644 --- a/ext/repo_releasefile_products.c +++ b/ext/repo_releasefile_products.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "pool.h" #include "repo.h" @@ -150,7 +151,7 @@ repo_add_releasefile_products(Repo *repo, const char *dirpath, int flags) fullpath = join2(&pd.jd, dirpath, "/", entry->d_name); if ((fp = fopen(fullpath, "r")) == 0) { - perror(fullpath); + pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno)); continue; } add_releasefile_product(&pd, fp); diff --git a/ext/repo_zyppdb.c b/ext/repo_zyppdb.c index 19eabd9a..a4487c36 100644 --- a/ext/repo_zyppdb.c +++ b/ext/repo_zyppdb.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "pool.h" #include "repo.h" @@ -344,7 +345,7 @@ repo_add_zyppdb_products(Repo *repo, const char *dirpath, int flags) fullpath = join2(&pd.jd, dirpath, "/", entry->d_name); if ((fp = fopen(fullpath, "r")) == 0) { - perror(fullpath); + pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno)); continue; } add_zyppdb_product(&pd, fp);