From 56917dc30493680219e0eceddbf178242522f11d Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Mon, 28 Mar 2005 08:21:17 +0000 Subject: improved logs (use _alpm_log instead of fprintf) --- lib/libalpm/util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/libalpm/util.c') 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; } -- cgit v1.2.3-24-g4f1b