[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 18/37] block: vhdx - minor comments and typo corre
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v2 18/37] block: vhdx - minor comments and typo correction. |
Date: |
Fri, 8 Nov 2013 11:12:12 +0100 |
From: Jeff Cody <address@hidden>
Just a couple of minor comments to help note where allocated
buffers are freed, and a typo fix.
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/vhdx.c | 6 ++++--
block/vhdx.h | 6 +++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/block/vhdx.c b/block/vhdx.c
index 6cb0412..b497c27 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -6,9 +6,9 @@
* Authors:
* Jeff Cody <address@hidden>
*
- * This is based on the "VHDX Format Specification v0.95", published 4/12/2012
+ * This is based on the "VHDX Format Specification v1.00", published 8/25/2012
* by Microsoft:
- * https://www.microsoft.com/en-us/download/details.aspx?id=29681
+ * https://www.microsoft.com/en-us/download/details.aspx?id=34750
*
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
* See the COPYING.LIB file in the top-level directory.
@@ -264,6 +264,7 @@ static int vhdx_parse_header(BlockDriverState *bs,
BDRVVHDXState *s)
uint64_t h2_seq = 0;
uint8_t *buffer;
+ /* header1 & header2 are freed in vhdx_close() */
header1 = qemu_blockalign(bs, sizeof(VHDXHeader));
header2 = qemu_blockalign(bs, sizeof(VHDXHeader));
@@ -790,6 +791,7 @@ static int vhdx_open(BlockDriverState *bs, QDict *options,
int flags,
goto fail;
}
+ /* s->bat is freed in vhdx_close() */
s->bat = qemu_blockalign(bs, s->bat_rt.length);
ret = bdrv_pread(bs->file, s->bat_offset, s->bat, s->bat_rt.length);
diff --git a/block/vhdx.h b/block/vhdx.h
index fb687ed..9eb6b97 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -6,9 +6,9 @@
* Authors:
* Jeff Cody <address@hidden>
*
- * This is based on the "VHDX Format Specification v0.95", published 4/12/2012
+ * This is based on the "VHDX Format Specification v1.00", published 8/25/2012
* by Microsoft:
- * https://www.microsoft.com/en-us/download/details.aspx?id=29681
+ * https://www.microsoft.com/en-us/download/details.aspx?id=34750
*
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
* See the COPYING.LIB file in the top-level directory.
@@ -116,7 +116,7 @@ typedef struct QEMU_PACKED VHDXHeader {
valid. */
uint16_t log_version; /* version of the log format. Mustn't
be
zero, unless log_guid is also zero
*/
- uint16_t version; /* version of th evhdx file.
Currently,
+ uint16_t version; /* version of the vhdx file.
Currently,
only supported version is "1" */
uint32_t log_length; /* length of the log. Must be multiple
of 1MB */
--
1.8.3.1
- [Qemu-devel] [PULL v2 01/37] qapi: Fix comment for create-type to match code., (continued)
- [Qemu-devel] [PULL v2 01/37] qapi: Fix comment for create-type to match code., Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 04/37] block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 05/37] block: qemu-iotests, fix _make_test_img() to work with spaced pathnames, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 06/37] block: qemu-iotests, add quotes to $TEST_IMG.base usage in 017, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 09/37] block: qemu-iotests, add quotes to $TEST_IMG usage for 051, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 12/37] libqtest: rename qmp() to qmp_discard_response(), Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 13/37] libqtest: add qmp(fmt, ...) -> QDict* function, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 16/37] block: Save errno before error_setg_errno, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 14/37] blockdev-test: add test case for drive_add duplicate IDs, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 17/37] block/vpc: fix virtual size for images created with disk2vhd, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 18/37] block: vhdx - minor comments and typo correction.,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL v2 20/37] block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header., Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 24/37] block: vhdx code movement - move vhdx_close() above vhdx_open(), Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 25/37] block: vhdx - log parsing, replay, and flush support, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 27/37] block: vhdx - add log write support, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 02/37] qemu-iotests: Filter out actual image size in 067, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 29/37] block: vhdx - remove BAT file offset bit shifting, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 30/37] block: vhdx - move more endian translations to vhdx-endian.c, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 03/37] block/raw-posix: fix FreeBSD compilation, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 32/37] block: vhdx - fix comment typos in header, fix incorrect struct fields, Stefan Hajnoczi, 2013/11/08
- [Qemu-devel] [PULL v2 07/37] block: qemu-iotests, add quotes to $TEST_IMG usage in 019, Stefan Hajnoczi, 2013/11/08