diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 3 | ||||
-rw-r--r-- | block/ssh.c | 10 | ||||
-rw-r--r-- | block/vmdk.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 778fc1ec13..fb28493c02 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2282,6 +2282,9 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) .lazy_refcounts = s->compatible_features & QCOW2_COMPAT_LAZY_REFCOUNTS, .has_lazy_refcounts = true, + .corrupt = s->incompatible_features & + QCOW2_INCOMPAT_CORRUPT, + .has_corrupt = true, }; } diff --git a/block/ssh.c b/block/ssh.c index cf43bc0f89..f466cbf396 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -517,6 +517,11 @@ static int connect_to_ssh(BDRVSSHState *s, QDict *options, const char *host, *user, *path, *host_key_check; int port; + if (!qdict_haskey(options, "host")) { + ret = -EINVAL; + error_setg(errp, "No hostname was specified"); + goto err; + } host = qdict_get_str(options, "host"); if (qdict_haskey(options, "port")) { @@ -525,6 +530,11 @@ static int connect_to_ssh(BDRVSSHState *s, QDict *options, port = 22; } + if (!qdict_haskey(options, "path")) { + ret = -EINVAL; + error_setg(errp, "No path was specified"); + goto err; + } path = qdict_get_str(options, "path"); if (qdict_haskey(options, "user")) { diff --git a/block/vmdk.c b/block/vmdk.c index afdea1a8b6..4ae6c75310 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1113,7 +1113,7 @@ static int get_cluster_offset(BlockDriverState *bs, uint32_t min_count, *l2_table; bool zeroed = false; int64_t ret; - int32_t cluster_sector; + int64_t cluster_sector; if (m_data) { m_data->valid = 0; |