Commit 977c736f authored by Markus Armbruster's avatar Markus Armbruster
Browse files

qapi: Mechanically convert FOO_lookup[...] to FOO_str(...)



Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-Id: <1503564371-26090-14-git-send-email-armbru@redhat.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 5b5f825d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)
            return;
        } else if (maxnode == 0 && backend->policy != MPOL_DEFAULT) {
            error_setg(errp, "host-nodes must be set for policy %s",
                       HostMemPolicy_lookup[backend->policy]);
                       HostMemPolicy_str(backend->policy));
            return;
        }

+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

+2 −2
Original line number Diff line number Diff line
@@ -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;
    }

+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

+2 −2
Original line number Diff line number Diff line
@@ -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;
    }

Loading