diff options
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -33,6 +33,7 @@ #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qjson.h" +#include "qapi/qmp/qnull.h" #include "qapi/qmp/qstring.h" #include "qapi/qobject-output-visitor.h" #include "qapi/qapi-visit-block-core.h" @@ -2645,7 +2646,9 @@ static BlockDriverState *bdrv_open_inherit(const char *filename, /* See cautionary note on accessing @options above */ backing = qdict_get_try_str(options, "backing"); - if (backing && *backing == '\0') { + if (qobject_to(QNull, qdict_get(options, "backing")) != NULL || + (backing && *backing == '\0')) + { flags |= BDRV_O_NO_BACKING; qdict_del(options, "backing"); } |