[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_pa
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] bootindex: add {del, modify}_boot_device_path function |
Date: |
Thu, 24 Jul 2014 12:08:51 +0200 |
On Do, 2014-07-24 at 16:38 +0800, address@hidden wrote:
> From: Gonglei <address@hidden>
>
> When we want to change one device's bootindex, we should do three
> things. On the on hand, remove the device from global fw_boot_order list,
> regardless attaching suffix or not delete. On the other hand, delete
> original object of the assigned bootindex. Finally add the new device's
> bootindex into the global fw_boot_order list.
Hmm. I think we should simply lookup the device and modify the
bootindex, leaving the entry as-is otherwise. In case the new bootindex
is already used by another device just throw an error.
> +void del_boot_device_path(int32_t bootindex, DeviceState *dev,
> + const char *suffix);
Should be del_boot_device_path(DeviceState *dev) and simply delete all
entries belonging to the device. Patch #3 can be much simpler then as
we can call the function from generic device cleanup code.
> +void modify_boot_device_path(int32_t bootindex, DeviceState *dev,
> + const char *suffix);
No need for suffix here if we just update the existing entry.
cheers,
Gerd
[Qemu-devel] [PATCH 2/6] fw_cfg: add fw_cfg_machine_reset function, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 5/6] qemu-monitor: HMP set-bootindex wrapper, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 4/6] qmp: add set-bootindex command, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 3/6] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/07/24
[Qemu-devel] [PATCH 6/6] spapr: fix possible memory leak, arei.gonglei, 2014/07/24