From: Kevin Wolf <kwolf@redhat.com>
To: alex@csgraf.de
Cc: nolan@sigbus.net, qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] Add HTTP protocol using curl v5
Date: Thu, 07 May 2009 17:19:25 +0200 [thread overview]
Message-ID: <4A02FBFD.30904@redhat.com> (raw)
In-Reply-To: <1241707700-29109-1-git-send-email-alex@csgraf.de>
I haven't really read the patch, so just two small things:
alex@csgraf.de schrieb:
> +BlockDriver bdrv_http = {
> + .format_name = "http",
> + .protocol_name = "http",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
This looks like tabs, should be spaces instead.
> +BlockDriver bdrv_https = {
> + .format_name = "https",
> + .protocol_name = "https",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> +
> +BlockDriver bdrv_ftp = {
> + .format_name = "ftp",
> + .protocol_name = "ftp",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> +
> +BlockDriver bdrv_ftps = {
> + .format_name = "ftps",
> + .protocol_name = "ftps",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> +
> +BlockDriver bdrv_sftp = {
> + .format_name = "sftp",
> + .protocol_name = "sftp",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> +
> +BlockDriver bdrv_scp = {
> + .format_name = "scp",
> + .protocol_name = "scp",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> +
> +BlockDriver bdrv_tftp = {
> + .format_name = "tftp",
> + .protocol_name = "tftp",
> +
> + .instance_size = sizeof(BDRVHTTPState),
> + .bdrv_open = http_open,
> + .bdrv_close = http_close,
> + .bdrv_getlength = http_getlength,
> +
> + .aiocb_size = sizeof(HTTPAIOCB),
> + .bdrv_aio_readv = http_aio_readv,
> + .bdrv_aio_cancel = http_aio_cancel,
> +};
> diff --git a/block.c b/block.c
> index 3d1223d..55af1eb 100644
> --- a/block.c
> +++ b/block.c
> @@ -1504,6 +1504,18 @@ void bdrv_init(void)
> bdrv_register(&bdrv_qcow2);
> bdrv_register(&bdrv_parallels);
> bdrv_register(&bdrv_nbd);
> +#ifdef CONFIG_CURL
> + bdrv_register(&bdrv_http);
> + bdrv_register(&bdrv_https);
> + bdrv_register(&bdrv_ftp);
> + bdrv_register(&bdrv_ftps);
> + bdrv_register(&bdrv_tftp);
> +#if 0
> + /* SSH over curl can't detect file sizes :-( */
> + bdrv_register(&bdrv_sftp);
> + bdrv_register(&bdrv_scp);
> +#endif
> +#endif
> }
>
> void aio_pool_init(AIOPool *pool, int aiocb_size,
> diff --git a/block.h b/block.h
> index 5aef076..5e554e8 100644
> --- a/block.h
> +++ b/block.h
> @@ -20,6 +20,13 @@ extern BlockDriver bdrv_vvfat;
> extern BlockDriver bdrv_qcow2;
> extern BlockDriver bdrv_parallels;
> extern BlockDriver bdrv_nbd;
> +extern BlockDriver bdrv_http;
> +extern BlockDriver bdrv_https;
> +extern BlockDriver bdrv_ftp;
> +extern BlockDriver bdrv_ftps;
> +extern BlockDriver bdrv_sftp;
> +extern BlockDriver bdrv_scp;
> +extern BlockDriver bdrv_tftp;
No #ifdefs here?
Kevin
prev parent reply other threads:[~2009-05-07 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 14:48 [Qemu-devel] [PATCH] Add HTTP protocol using curl v5 alex
2009-05-07 15:19 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A02FBFD.30904@redhat.com \
--to=kwolf@redhat.com \
--cc=agraf@suse.de \
--cc=alex@csgraf.de \
--cc=nolan@sigbus.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).