Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-28 08:21:17 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-28 08:21:17 +0000
commit56917dc30493680219e0eceddbf178242522f11d (patch)
tree4dd1c8eeff9122a6de3473c2395ac6c5ea13f225 /lib/libalpm/util.c
parent9c17eb88f09bfbead0c7b9c63dd47aa6fcfdfda6 (diff)
improved logs (use _alpm_log instead of fprintf)
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 174c3a66..9e689685 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -240,9 +240,7 @@ int _alpm_unpack(char *archive, const char *prefix, const char *fn)
while(!th_read(tar)) {
if(fn && strcmp(fn, th_get_pathname(tar))) {
if(TH_ISREG(tar) && tar_skip_regfile(tar)) {
- char errorstr[255];
- snprintf(errorstr, 255, "bad tar archive: %s", archive);
- perror(errorstr);
+ _alpm_log(PM_LOG_ERROR, "bad tar archive: %s", archive);
tar_close(tar);
return(1);
}
@@ -250,7 +248,7 @@ int _alpm_unpack(char *archive, const char *prefix, const char *fn)
}
snprintf(expath, PATH_MAX, "%s/%s", prefix, th_get_pathname(tar));
if(tar_extract_file(tar, expath)) {
- fprintf(stderr, "could not extract %s: %s\n", th_get_pathname(tar), strerror(errno));
+ _alpm_log(PM_LOG_ERROR, "could not extract %s (%s)", th_get_pathname(tar), strerror(errno));
}
if(fn) break;
}