aboutsummaryrefslogtreecommitdiff
path: root/block/vpc.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-11-02 22:51:34 -0400
committerRichard Henderson <richard.henderson@linaro.org>2021-11-02 22:51:34 -0400
commit22d5760cb43e2fe73e61fda145a98f3217ca47bf (patch)
treea588321635682f03ab75d8fec2ed0389b72e6501 /block/vpc.c
parent835b04ed79b72913841bb04ba3302da388767b44 (diff)
parent7da9623cc078229caf07c290e16401ccdb9408d2 (diff)
downloadqemu-22d5760cb43e2fe73e61fda145a98f3217ca47bf.zip
qemu-22d5760cb43e2fe73e61fda145a98f3217ca47bf.tar.gz
qemu-22d5760cb43e2fe73e61fda145a98f3217ca47bf.tar.bz2
Merge remote-tracking branch 'remotes/XanClic/tags/pull-block-2021-11-02' into staging
Block patches: - Add "toolsversion" creation option for vmdk images - iotest fix (297, the linting test) - Added sanity check when opening vpc images - Doc fix # gpg: Signature made Tue 02 Nov 2021 10:14:52 AM EDT # gpg: using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF # gpg: issuer "hreitz@redhat.com" # gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00 4D34 A1FA 40D0 9801 9CDF * remotes/XanClic/tags/pull-block-2021-11-02: block/vpc: Add a sanity check that fixed-size images have the right type vmdk: allow specification of tools version pylint: fix errors and warnings generated by tests/qemu-iotests/297 qemu-img: Consistent docs for convert -F Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'block/vpc.c')
-rw-r--r--block/vpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/vpc.c b/block/vpc.c
index 1b4c733..297a262 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -276,7 +276,8 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
if (ret < 0) {
goto fail;
}
- if (strncmp(footer->creator, "conectix", 8)) {
+ if (strncmp(footer->creator, "conectix", 8) ||
+ be32_to_cpu(footer->type) != VHD_FIXED) {
error_setg(errp, "invalid VPC image");
ret = -EINVAL;
goto fail;