From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famcool@gmail.com>
Cc: stefanha@gmail.com, qemu-devel@nongnu.org, hch@lst.de
Subject: Re: [Qemu-devel] [PATCH v9 00/12] Adding VMDK monolithic flat support
Date: Mon, 18 Jul 2011 16:52:51 +0200 [thread overview]
Message-ID: <4E2448C3.4030101@redhat.com> (raw)
In-Reply-To: <1310471799-20055-1-git-send-email-famcool@gmail.com>
Am 12.07.2011 13:56, schrieb Fam Zheng:
> Changes from v8:
> 09/12: remove duplicated sscanf
> 10/12: change option name to 'subformat', change commit message typo,
> factor common parts of creating, and other small improvements
>
> Fam Zheng (12):
> VMDK: introduce VmdkExtent
> VMDK: bugfix, align offset to cluster in get_whole_cluster
> VMDK: probe for monolithicFlat images
> VMDK: separate vmdk_open by format version
> VMDK: add field BDRVVmdkState.desc_offset
> VMDK: flush multiple extents
> VMDK: move 'static' cid_update flag to bs field
> VMDK: change get_cluster_offset return type
> VMDK: open/read/write for monolithicFlat image
> VMDK: create different subformats
> VMDK: fix coding style
> block: add bdrv_get_allocated_file_size() operation
>
> block.c | 19 +
> block.h | 1 +
> block/raw-posix.c | 21 +
> block/raw-win32.c | 29 ++
> block/vmdk.c | 1296 ++++++++++++++++++++++++++++++++++++-----------------
> block_int.h | 2 +
> qemu-img.c | 31 +--
> 7 files changed, 964 insertions(+), 435 deletions(-)
This doesn't build for me:
cc1: warnings being treated as errors
block/vmdk.c: In function 'vmdk_parse_extents':
block/vmdk.c:482: error: format '%lld' expects type 'long long int *',
but argument 4 has type 'int64_t *'
block/vmdk.c:482: error: format '%lld' expects type 'long long int *',
but argument 7 has type 'int64_t *'
block/vmdk.c: In function 'vmdk_create_extent':
block/vmdk.c:1024: error: invalid storage class for function
'filename_decompose'
[...]
The following patch makes it compile. I haven't tried figuring out which
patches need to be fixed, but should be easy enough for you. Please
resend only those patches that need to be changed, I have already merged
everything (plus my fixup) and will only update it in the block branch.
Kevin
diff --git a/block/vmdk.c b/block/vmdk.c
index 63d7605..37478d2 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -478,7 +478,7 @@ static int vmdk_parse_extents(const char *desc,
BlockDriverState *bs,
* RW [size in sectors] SPARSE "file-name.vmdk"
*/
flat_offset = -1;
- ret = sscanf(p, "%10s %lld %10s %511s %lld",
+ ret = sscanf(p, "%10s %" SCNd64 " %10s %511s %" SCNd64,
access, §ors, type, fname, &flat_offset);
if (ret < 4 || strcmp(access, "RW")) {
goto next_line;
@@ -927,6 +927,7 @@ static int vmdk_create_extent(const char *filename,
int64_t filesize, bool flat)
0644);
if (fd < 0) {
return -errno;
+ }
if (flat) {
ret = ftruncate(fd, filesize);
if (ret < 0) {
next prev parent reply other threads:[~2011-07-18 14:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 11:56 [Qemu-devel] [PATCH v9 00/12] Adding VMDK monolithic flat support Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 01/12] VMDK: introduce VmdkExtent Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 02/12] VMDK: bugfix, align offset to cluster in get_whole_cluster Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 03/12] VMDK: probe for monolithicFlat images Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 04/12] VMDK: separate vmdk_open by format version Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 05/12] VMDK: add field BDRVVmdkState.desc_offset Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 06/12] VMDK: flush multiple extents Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 07/12] VMDK: move 'static' cid_update flag to bs field Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 08/12] VMDK: change get_cluster_offset return type Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 09/12] VMDK: open/read/write for monolithicFlat image Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 10/12] VMDK: create different subformats Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 11/12] VMDK: fix coding style Fam Zheng
2011-07-12 11:56 ` [Qemu-devel] [PATCH v9 12/12] block: add bdrv_get_allocated_file_size() operation Fam Zheng
2011-07-18 8:27 ` [Qemu-devel] [PATCH v9 00/12] Adding VMDK monolithic flat support Stefan Hajnoczi
2011-07-18 14:52 ` Kevin Wolf [this message]
2011-07-19 0:47 ` Fam Zheng
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=4E2448C3.4030101@redhat.com \
--to=kwolf@redhat.com \
--cc=famcool@gmail.com \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).