]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
some other perror->pool_error changes
authorMichael Schroeder <mls@suse.de>
Mon, 15 Apr 2013 12:55:48 +0000 (14:55 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 15 Apr 2013 12:55:48 +0000 (14:55 +0200)
ext/repo_products.c
ext/repo_releasefile_products.c
ext/repo_zyppdb.c

index 1994e7ae001db52cf66c5c528b79a8179237af3a..4609ceb9e0cd9d3e2537ab174071734a659367b7 100644 (file)
@@ -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;
index 5c8ec332bac89e9333b0b9a5a6c8bd312f9b57d2..a40bc984a6faba5ae3fcb82c1bc3844c4af8d4e5 100644 (file)
@@ -19,6 +19,7 @@
 #include <assert.h>
 #include <dirent.h>
 #include <ctype.h>
+#include <errno.h>
 
 #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);
index 19eabd9a570ee745df52647d856211b433ffafa4..a4487c36aa60a53ec709b5ef0cbeb7eddb8b85b3 100644 (file)
@@ -23,6 +23,7 @@
 #include <assert.h>
 #include <dirent.h>
 #include <expat.h>
+#include <errno.h>
 
 #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);