aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJoelle van Dyne <j@getutm.app>2021-03-22 01:24:44 -0700
committerKlaus Jensen <k.jensen@samsung.com>2021-04-05 19:33:04 +0200
commit498114b37bc99fddcfc24b92bff7f1323fb32672 (patch)
treef6eac2da44b2bee08094a96b9582cce6205e55b3 /hw
parentb62b178c37718c988f64660b13c3e4f2c7d71a78 (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/block/nvme.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 08c204d46c..7244534a89 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -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,