Skip to content

Commit

Permalink
bootindex: rework add_boot_device_path function
Browse files Browse the repository at this point in the history
Add the function of updating bootindex about fw_boot_order list
in add_boot_device_path(). We should delete the old one if a
device has existed in global fw_boot_order list.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
gongleiarei authored and kraxel committed Oct 15, 2014
1 parent bdbb5b1 commit e614b54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bootdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,

assert(dev != NULL || suffix != NULL);

del_boot_device_path(dev, suffix);

node = g_malloc0(sizeof(FWBootEntry));
node->bootindex = bootindex;
node->suffix = g_strdup(suffix);
Expand Down

0 comments on commit e614b54

Please sign in to comment.