hw/block/nvme: expose 'bootindex' property

The check for `n->namespace.blkconf.blk` always fails because
this is in the initialization function.

Signed-off-by: Joelle van Dyne <j@getutm.app>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
Joelle van Dyne 2021-03-22 01:24:44 -07:00 committed by Klaus Jensen
parent b62b178c37
commit 498114b37b

View File

@ -6328,11 +6328,9 @@ static void nvme_instance_init(Object *obj)
{
NvmeCtrl *n = NVME(obj);
if (n->namespace.blkconf.blk) {
device_add_bootindex_property(obj, &n->namespace.blkconf.bootindex,
"bootindex", "/namespace@1,0",
DEVICE(obj));
}
device_add_bootindex_property(obj, &n->namespace.blkconf.bootindex,
"bootindex", "/namespace@1,0",
DEVICE(obj));
object_property_add(obj, "smart_critical_warning", "uint8",
nvme_get_smart_warning,