summaryrefslogtreecommitdiff
path: root/bootdevice.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-15bootindex: change fprintf to error_reportGonglei1-1/+2
The function may be called by qmp command, we should report error message to the caller. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-10-15bootindex: delete bootindex when device is removedGonglei1-0/+2
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>
2014-10-15bootindex: move calling add_boot_device_patch to bootindex setter functionGonglei1-0/+2
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>
2014-10-15bootindex: add a setter/getter functions wrapper for bootindex propertyGonglei1-0/+73
when we remove bootindex form qdev.property to qom.property, we can use those functions set/get bootindex property for all correlative devices. Meanwhile set the initial value of bootindex to -1. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-10-15bootindex: support to set a existent device's bootindex to -1Gonglei1-0/+1
When set a device's bootindex to -1, we remove it from 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>
2014-10-15bootindex: rework add_boot_device_path functionGonglei1-0/+2
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>
2014-10-15bootindex: add del_boot_device_path functionGonglei1-0/+20
Introduce del_boot_device_path() to clean up fw_cfg content when hot-unplugging a device that refers to a bootindex or update a existent devcie's bootindex. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Chenliang <chenliang88@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-10-15bootindex: add check bootindex functionGonglei1-0/+15
Determine whether a given bootindex exists or not. If exists, we report an error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-10-15bootdevice: move bootdevice related code to new file bootdevice.cGonglei1-0/+142
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>