From nobody Fri May 3 14:05:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605613235; cv=none; d=zohomail.com; s=zohoarc; b=lmNq6Y6UQArxFT1gHgkkSN3VMc5+G4MSUmNSw6ELbqXYIErNeiD9o8+zRK54FqEhhL9BT9WTdbZQxkH2ft2VPT8qe0x6pMZSGUb8c04dKukAXg4LeS9THmxWq3m35AudAzZiJZGjAoeSuaYddPTU3ZS/sHCngaiZ113mD8gFSpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605613235; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=QpJ9IH6T/7VwvyWJDc2VrQB3mCDgd19DdGPQ6cTqENI=; b=Z/BukTSqi1C1p8YaRGJQXM4TT9Lvbl+MgWMAJn7gkCaDXELYf27k6JLo2nqq2MX3IwDdNSdmcZEIGqtfJm5G8E7vvk3CEzKxxJl1L44Vpz9kEP761lth4oJ0ZV6cM7cfFjEMP+LGZcri0cx7L57wMp9AnuKclkRZtEuElev/+Tg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605613235352652.1016073022057; Tue, 17 Nov 2020 03:40:35 -0800 (PST) Received: from localhost ([::1]:58976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kezLe-0003UV-9n for importer@patchew.org; Tue, 17 Nov 2020 06:40:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kezKC-0002Kc-6f; Tue, 17 Nov 2020 06:39:07 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:51096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kezK4-0005gF-7p; Tue, 17 Nov 2020 06:39:01 -0500 Received: by mail-wm1-x344.google.com with SMTP id h2so2940324wmm.0; Tue, 17 Nov 2020 03:38:53 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o63sm3153329wmo.2.2020.11.17.03.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 03:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QpJ9IH6T/7VwvyWJDc2VrQB3mCDgd19DdGPQ6cTqENI=; b=QC1wssdWxdtIZWx2O89GTMfBRRTrRreKkVsNs05NNKrEd6t/ZJySUE+d8ZUfu+wikO y18Yb0Z088hevSPT713EOPcg65vYTyOwtrbe+4Yr2z2Dg+EJZpWDquoRXkMIpAfwOQR3 0deZEdKbRFjkxFuetCrZJpjqC/25244NQPGNgvaDVYZX8lSTpzBtS28XA4Lk7o/B3K4A aSVwXdPzmzXMOrsNMa45wBvLPN6HVFlyY4PvuUaUepZuPsOvX1ZKTkina1Od77NS9whF 2Y5iThaeIRIB3spNGdoVEgE0hUfrtM4j42r3XrBSAA/lewwLQbqaDJjonYXvZE5URlh4 eadg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=QpJ9IH6T/7VwvyWJDc2VrQB3mCDgd19DdGPQ6cTqENI=; b=AhPP/i/jI/0tXsidpnq02fRK/tlDJRhTGewFy/1lVJuNKChuj172eikpWfMiw0Y+ZS 5pYFXXCQ85Iufsu7cd1b2Cbu8aRlOYMOJ0AnFCZHiAsDE32zri97xwHSY4U9amT7UYyf 7jkqIPZ7tOeOWcDrHv1DVTK47gfsD8uklPZB9vCC16wZ7s9PcSuVWZOAz25S8PPUuXlq xj8FcoD0uXVKVqitFzfp+DTE3CkNyWZJSACGgpu2LSJ4btHpSMcUvj2m79wVxuvpN5YM rl2N2WuiDzydsr8R7hpp4rhN96IIIBGJBHPVBOWdOxuVpCumvrH8jmL8f0IZ5RTr53t+ n5uQ== X-Gm-Message-State: AOAM532D/7l5skD1qyqU4ljBKDcPKP3Q0PYQM9c6hF90h56nBPQyi4Ue 18puWnj8ukpOWyDF70KRwT/wuE5VSEQ= X-Google-Smtp-Source: ABdhPJxjA0c36K085GfKTi/8YDukOXOFslidolUT5TiTbDcwxMj0vBJ9ElzIoCtqwaY2udd89dR8vA== X-Received: by 2002:a7b:cc12:: with SMTP id f18mr4042478wmh.110.1605613132185; Tue, 17 Nov 2020 03:38:52 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH] curl: remove compatibility code Date: Tue, 17 Nov 2020 12:38:50 +0100 Message-Id: <20201117113850.64108-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" cURL 7.16.0 was released in October 2006. Just remove code that is in all likelihood not being used anywhere. Signed-off-by: Paolo Bonzini --- block/curl.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/block/curl.c b/block/curl.c index 4f907c47be..b77bfe12e7 100644 --- a/block/curl.c +++ b/block/curl.c @@ -37,26 +37,6 @@ =20 // #define DEBUG_VERBOSE =20 -#if LIBCURL_VERSION_NUM >=3D 0x071000 -/* The multi interface timer callback was introduced in 7.16.0 */ -#define NEED_CURL_TIMER_CALLBACK -#define HAVE_SOCKET_ACTION -#endif - -#ifndef HAVE_SOCKET_ACTION -/* If curl_multi_socket_action isn't available, define it statically here = in - * terms of curl_multi_socket. Note that ev_bitmask will be ignored, which= is - * less efficient but still safe. */ -static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, - curl_socket_t sockfd, - int ev_bitmask, - int *running_handles) -{ - return curl_multi_socket(multi_handle, sockfd, running_handles); -} -#define curl_multi_socket_action __curl_multi_socket_action -#endif - #define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \ CURLPROTO_FTP | CURLPROTO_FTPS) =20 @@ -140,7 +120,6 @@ typedef struct BDRVCURLState { static void curl_clean_state(CURLState *s); static void curl_multi_do(void *arg); =20 -#ifdef NEED_CURL_TIMER_CALLBACK /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque) { @@ -156,7 +135,6 @@ static int curl_timer_cb(CURLM *multi, long timeout_ms,= void *opaque) } return 0; } -#endif =20 /* Called from curl_multi_do_locked, with s->mutex held. */ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, @@ -433,7 +411,6 @@ static void curl_multi_do(void *arg) =20 static void curl_multi_timeout_do(void *arg) { -#ifdef NEED_CURL_TIMER_CALLBACK BDRVCURLState *s =3D (BDRVCURLState *)arg; int running; =20 @@ -446,9 +423,6 @@ static void curl_multi_timeout_do(void *arg) =20 curl_multi_check_completion(s); qemu_mutex_unlock(&s->mutex); -#else - abort(); -#endif } =20 /* Called with s->mutex held. */ @@ -598,10 +572,8 @@ static void curl_attach_aio_context(BlockDriverState *= bs, s->multi =3D curl_multi_init(); s->aio_context =3D new_context; curl_multi_setopt(s->multi, CURLMOPT_SOCKETFUNCTION, curl_sock_cb); -#ifdef NEED_CURL_TIMER_CALLBACK curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, s); curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, curl_timer_cb); -#endif } =20 static QemuOptsList runtime_opts =3D { --=20 2.28.0