summaryrefslogtreecommitdiffstats
path: root/bootdevice.c
Commit message (Collapse)AuthorAgeFilesLines
* bootindex: change fprintf to error_reportGonglei2014-10-151-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>
* bootindex: delete bootindex when device is removedGonglei2014-10-151-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>
* bootindex: move calling add_boot_device_patch to bootindex setter functionGonglei2014-10-151-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>
* bootindex: add a setter/getter functions wrapper for bootindex propertyGonglei2014-10-151-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>
* bootindex: support to set a existent device's bootindex to -1Gonglei2014-10-151-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>
* bootindex: rework add_boot_device_path functionGonglei2014-10-151-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>
* bootindex: add del_boot_device_path functionGonglei2014-10-151-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>
* bootindex: add check bootindex functionGonglei2014-10-151-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>
* bootdevice: move bootdevice related code to new file bootdevice.cGonglei2014-10-151-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>
OpenPOWER on IntegriCloud