diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2025-08-25 12:52:46 +0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2025-09-03 10:57:50 +0300 |
commit | 29e68f41c064299d4b45f3517c2e4400b1c17231 (patch) | |
tree | 9f96ea082d82893f5eade7fc6958a937320d5f39 | |
parent | 606978500c3d18fb89a49844f253097b17f757de (diff) | |
download | qemu-29e68f41c064299d4b45f3517c2e4400b1c17231.zip qemu-29e68f41c064299d4b45f3517c2e4400b1c17231.tar.gz qemu-29e68f41c064299d4b45f3517c2e4400b1c17231.tar.bz2 |
block/curl: drop old/unuspported curl version checks
We currently require libcurl >=7.29.0 (since f9cd86fe72be3cd8).
Drop older LIBCURL_VERSION_NUM checks from the driver.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | block/curl.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/block/curl.c b/block/curl.c index 00b949e..e0f98e0 100644 --- a/block/curl.c +++ b/block/curl.c @@ -516,7 +516,7 @@ static int curl_init_state(BDRVCURLState *s, CURLState *state) CURLOPT_REDIR_PROTOCOLS_STR, PROTOCOLS)) { goto err; } -#elif LIBCURL_VERSION_NUM >= 0x071304 +#else if (curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, PROTOCOLS) || curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS, PROTOCOLS)) { goto err; @@ -821,22 +821,11 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, goto out; } #endif - /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not - * know or the size is zero. From 7.19.4 CURL returns -1 if size is not - * known and zero if it is really zero-length file. */ -#if LIBCURL_VERSION_NUM >= 0x071304 if (cl < 0) { pstrcpy(state->errmsg, CURL_ERROR_SIZE, "Server didn't report file size."); goto out; } -#else - if (cl <= 0) { - pstrcpy(state->errmsg, CURL_ERROR_SIZE, - "Unknown file size or zero-length file."); - goto out; - } -#endif s->len = cl; |