bootindex: move calling add_boot_device_patch to bootindex setter function

On this way, we can assure the new bootindex take effect
during vm rebooting.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/bootdevice.c b/bootdevice.c
index 69cffd8..79c2327 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -212,6 +212,8 @@
     /* change bootindex to a new one */
     *prop->bootindex = boot_index;
 
+    add_boot_device_path(*prop->bootindex, prop->dev, prop->suffix);
+
 out:
     if (local_err) {
         error_propagate(errp, local_err);