diff options
author | Max Reitz <mreitz@redhat.com> | 2013-10-10 11:09:26 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:50:00 +0200 |
commit | 4092e99d935fe26fd53631cc9e170f9a19e3ee4a (patch) | |
tree | 2ce159c9530e47563538dcb4711884f60735e12a | |
parent | 05de7e86cab3ed3830de38b38b39bbc711bc1158 (diff) | |
download | qemu-4092e99d935fe26fd53631cc9e170f9a19e3ee4a.zip qemu-4092e99d935fe26fd53631cc9e170f9a19e3ee4a.tar.gz qemu-4092e99d935fe26fd53631cc9e170f9a19e3ee4a.tar.bz2 |
qcow2: Array assigning options to OL check bits
Add an array which assigns the option string to its corresponding
overlap check bit.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/qcow2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index a517e3d..eee7eaf 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -404,6 +404,17 @@ static QemuOptsList qcow2_runtime_opts = { }, }; +static const char *overlap_bool_option_names[QCOW2_OL_MAX_BITNR] = { + [QCOW2_OL_MAIN_HEADER_BITNR] = QCOW2_OPT_OVERLAP_MAIN_HEADER, + [QCOW2_OL_ACTIVE_L1_BITNR] = QCOW2_OPT_OVERLAP_ACTIVE_L1, + [QCOW2_OL_ACTIVE_L2_BITNR] = QCOW2_OPT_OVERLAP_ACTIVE_L2, + [QCOW2_OL_REFCOUNT_TABLE_BITNR] = QCOW2_OPT_OVERLAP_REFCOUNT_TABLE, + [QCOW2_OL_REFCOUNT_BLOCK_BITNR] = QCOW2_OPT_OVERLAP_REFCOUNT_BLOCK, + [QCOW2_OL_SNAPSHOT_TABLE_BITNR] = QCOW2_OPT_OVERLAP_SNAPSHOT_TABLE, + [QCOW2_OL_INACTIVE_L1_BITNR] = QCOW2_OPT_OVERLAP_INACTIVE_L1, + [QCOW2_OL_INACTIVE_L2_BITNR] = QCOW2_OPT_OVERLAP_INACTIVE_L2, +}; + static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { |