Skip to content

Commit

Permalink
hw/block/nvme: expose 'bootindex' property
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joelle van Dyne authored and birkelund committed Apr 5, 2021
1 parent b62b178 commit 498114b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hw/block/nvme.c
Expand Up @@ -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,
Expand Down

0 comments on commit 498114b

Please sign in to comment.