add rpmlog(RPMLOG_ERR, ...) for liblzma return codes
This commit is contained in:
parent
459b3bc3f8
commit
c254b0d63f
@ -2831,6 +2831,19 @@ static LZFILE *lzopen_internal(const char *path, const char *mode, int fd, int x
|
||||
ret = lzma_auto_decoder(&lzfile->strm, 100<<20, 0);
|
||||
}
|
||||
if (ret != LZMA_OK) {
|
||||
switch (ret) {
|
||||
case LZMA_MEM_ERROR:
|
||||
rpmlog(RPMLOG_ERR, "liblzma: Memory allocation failed");
|
||||
break;
|
||||
|
||||
case LZMA_DATA_ERROR:
|
||||
rpmlog(RPMLOG_ERR, "liblzma: File size limits exceeded");
|
||||
break;
|
||||
|
||||
default:
|
||||
rpmlog(RPMLOG_ERR, "liblzma: <Unknown error (%d), possibly a bug", ret);
|
||||
break;
|
||||
}
|
||||
fclose(fp);
|
||||
free(lzfile);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user