浏览代码

bootindex: delete bootindex when device is removed

Device should be removed from global boot list when
it is hot-unplugged.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gonglei 11 年之前
父节点
当前提交
4aca8a8178
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      bootdevice.c

+ 2 - 0
bootdevice.c

@@ -225,6 +225,8 @@ static void property_release_bootindex(Object *obj, const char *name,
 
 
 {
 {
     BootIndexProperty *prop = opaque;
     BootIndexProperty *prop = opaque;
+
+    del_boot_device_path(prop->dev, prop->suffix);
     g_free(prop);
     g_free(prop);
 }
 }