]> git.ipfire.org Git - thirdparty/libsolv.git/commit
Report unsupported compression in solv_xfopen() with errno 563/head
authorPetr Písař <ppisar@redhat.com>
Mon, 13 May 2024 07:55:01 +0000 (09:55 +0200)
committerPetr Písař <ppisar@redhat.com>
Wed, 15 May 2024 14:55:55 +0000 (16:55 +0200)
commitfee69285c3e530c80439adfb978de9da04e95760
tree7b4cd45647c1ecc7fcdf292f2e4252f69ad172d5
parent9c2b1a84b5a7ce0dc6e74226bdeb9527d6706791
Report unsupported compression in solv_xfopen() with errno

If libsolv was built without Zstandard support and "primary.xml.zst"
was passed solv_xfopen(), solv_xfopen() returned 0 without setting
errno. A calling application could not distinguish an unsupported
compression format from other I/O errors.

This patch improves this situation by setting errno variable to an
appropriate value. The value macros are documented in POSIX 2017.
ext/solv_xfopen.c