From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c20BN-0007gk-A4 for qemu-devel@nongnu.org; Wed, 02 Nov 2016 14:22:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c20BM-00047t-BN for qemu-devel@nongnu.org; Wed, 02 Nov 2016 14:22:41 -0400 Date: Wed, 2 Nov 2016 14:22:34 -0400 From: Jeff Cody Message-ID: <20161102182234.GC6642@localhost.localdomain> References: <20161102175539.4375-1-mreitz@redhat.com> <20161102175539.4375-4-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161102175539.4375-4-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.8? 3/3] block/curl: Drop TFTP "support" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Kevin Wolf , Markus Armbruster , Eric Blake On Wed, Nov 02, 2016 at 06:55:39PM +0100, Max Reitz wrote: > Because TFTP does not support byte ranges, it was never usable with our > curl block driver. Since apparently nobody has ever complained loudly > enough for someone to take care of the issue until now, it seems > reasonable to assume that nobody has ever actually used it. > > Therefore, it should be safe to just drop it from curl's protocol list. > > Signed-off-by: Max Reitz > --- > block/curl.c | 20 +------------------- > 1 file changed, 1 insertion(+), 19 deletions(-) > > diff --git a/block/curl.c b/block/curl.c > index e5eaa7b..ba8adae 100644 > --- a/block/curl.c > +++ b/block/curl.c > @@ -68,8 +68,7 @@ static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, > #endif > > #define PROTOCOLS (CURLPROTO_HTTP | CURLPROTO_HTTPS | \ > - CURLPROTO_FTP | CURLPROTO_FTPS | \ > - CURLPROTO_TFTP) > + CURLPROTO_FTP | CURLPROTO_FTPS) > > #define CURL_NUM_STATES 8 > #define CURL_NUM_ACB 8 > @@ -886,29 +885,12 @@ static BlockDriver bdrv_ftps = { > .bdrv_attach_aio_context = curl_attach_aio_context, > }; > > -static BlockDriver bdrv_tftp = { > - .format_name = "tftp", > - .protocol_name = "tftp", > - > - .instance_size = sizeof(BDRVCURLState), > - .bdrv_parse_filename = curl_parse_filename, > - .bdrv_file_open = curl_open, > - .bdrv_close = curl_close, > - .bdrv_getlength = curl_getlength, > - > - .bdrv_aio_readv = curl_aio_readv, > - > - .bdrv_detach_aio_context = curl_detach_aio_context, > - .bdrv_attach_aio_context = curl_attach_aio_context, > -}; > - > static void curl_block_init(void) > { > bdrv_register(&bdrv_http); > bdrv_register(&bdrv_https); > bdrv_register(&bdrv_ftp); > bdrv_register(&bdrv_ftps); > - bdrv_register(&bdrv_tftp); > } > > block_init(curl_block_init); > -- > 2.10.2 > Reviewed-by: Jeff Cody