diff options
author | Alberto Garcia <berto@igalia.com> | 2018-10-03 13:23:13 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-11-05 15:09:54 +0100 |
commit | 415bbca86dd671fd766cdb24f40add3fda70c38a (patch) | |
tree | 717fe0b74a948c4b683f3a8760eebe8bc5c24d9c | |
parent | a2b83a5165c567bb81fe4303d97a3cca5ccc8a15 (diff) |
block: replace "discard" literal with BDRV_OPT_DISCARD macro
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1327,7 +1327,7 @@ QemuOptsList bdrv_runtime_opts = { .help = "try to optimize zero writes (off, on, unmap)", }, { - .name = "discard", + .name = BDRV_OPT_DISCARD, .type = QEMU_OPT_STRING, .help = "discard operation (ignore/off, unmap/on)", }, @@ -1432,7 +1432,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockBackend *file, } } - discard = qemu_opt_get(opts, "discard"); + discard = qemu_opt_get(opts, BDRV_OPT_DISCARD); if (discard != NULL) { if (bdrv_parse_discard_flags(discard, &bs->open_flags) != 0) { error_setg(errp, "Invalid discard option"); @@ -3186,7 +3186,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue, update_flags_from_options(&reopen_state->flags, opts); - discard = qemu_opt_get_del(opts, "discard"); + discard = qemu_opt_get_del(opts, BDRV_OPT_DISCARD); if (discard != NULL) { if (bdrv_parse_discard_flags(discard, &reopen_state->flags) != 0) { error_setg(errp, "Invalid discard option"); |