diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-08-24 10:46:08 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-09-04 13:09:13 +0200 |
commit | 977c736f80c232de7c6476d793ed575359c049d8 (patch) | |
tree | 986bf327e75929660aa367008574343e59818ee4 /block | |
parent | 5b5f825d44306b18509cd10ba9ac6983e90d6e0f (diff) |
qapi: Mechanically convert FOO_lookup[...] to FOO_str(...)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1503564371-26090-14-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/backup.c | 2 | ||||
-rw-r--r-- | block/file-posix.c | 4 | ||||
-rw-r--r-- | block/file-win32.c | 2 | ||||
-rw-r--r-- | block/gluster.c | 4 | ||||
-rw-r--r-- | block/iscsi.c | 2 | ||||
-rw-r--r-- | block/nfs.c | 2 | ||||
-rw-r--r-- | block/qcow2.c | 4 | ||||
-rw-r--r-- | block/qed.c | 2 | ||||
-rw-r--r-- | block/rbd.c | 2 | ||||
-rw-r--r-- | block/sheepdog.c | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/block/backup.c b/block/backup.c index 504a089150..517c300a49 100644 --- a/block/backup.c +++ b/block/backup.c @@ -596,7 +596,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, error_setg(errp, "a sync_bitmap was provided to backup_run, " "but received an incompatible sync_mode (%s)", - MirrorSyncMode_lookup[sync_mode]); + MirrorSyncMode_str(sync_mode)); return NULL; } diff --git a/block/file-posix.c b/block/file-posix.c index d81eccc191..bfef91db63 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1724,7 +1724,7 @@ static int raw_regular_truncate(int fd, int64_t offset, PreallocMode prealloc, default: result = -ENOTSUP; error_setg(errp, "Unsupported preallocation mode: %s", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return result; } @@ -1759,7 +1759,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Preallocation mode '%s' unsupported for this " - "non-regular file", PreallocMode_lookup[prealloc]); + "non-regular file", PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/file-win32.c b/block/file-win32.c index 192ea819d9..f2a1830060 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -469,7 +469,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/gluster.c b/block/gluster.c index 0614e0c8aa..29f9427e47 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -1047,7 +1047,7 @@ static int qemu_gluster_create(const char *filename, default: ret = -EINVAL; error_setg(errp, "Unsupported preallocation mode: %s", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); break; } @@ -1099,7 +1099,7 @@ static int qemu_gluster_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/iscsi.c b/block/iscsi.c index d557c99668..8b47d30dcc 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2087,7 +2087,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/nfs.c b/block/nfs.c index bec16b72a6..337fcd9c84 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -772,7 +772,7 @@ static int nfs_file_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/qcow2.c b/block/qcow2.c index 3a93983e3f..cbe9681fb0 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2715,7 +2715,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, int64_t prealloc_size = qcow2_calc_prealloc_size(total_size, cluster_size, refcount_order); qemu_opt_set_number(opts, BLOCK_OPT_SIZE, prealloc_size, &error_abort); - qemu_opt_set(opts, BLOCK_OPT_PREALLOC, PreallocMode_lookup[prealloc], + qemu_opt_set(opts, BLOCK_OPT_PREALLOC, PreallocMode_str(prealloc), &error_abort); } @@ -3080,7 +3080,7 @@ static int qcow2_truncate(BlockDriverState *bs, int64_t offset, prealloc != PREALLOC_MODE_FALLOC && prealloc != PREALLOC_MODE_FULL) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/qed.c b/block/qed.c index dc54bf4a93..28e2ec89e8 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1399,7 +1399,7 @@ static int bdrv_qed_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/rbd.c b/block/rbd.c index 9c3aa638e7..144f350e1f 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -944,7 +944,7 @@ static int qemu_rbd_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } diff --git a/block/sheepdog.c b/block/sheepdog.c index abb2e79065..1052098ec5 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2176,7 +2176,7 @@ static int sd_truncate(BlockDriverState *bs, int64_t offset, if (prealloc != PREALLOC_MODE_OFF) { error_setg(errp, "Unsupported preallocation mode '%s'", - PreallocMode_lookup[prealloc]); + PreallocMode_str(prealloc)); return -ENOTSUP; } |