Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-18 Thread Li Qiang
Markus Armbruster 于2018年11月19日周一 下午3:01写道: > ÀîÇ¿ writes: > > > At 2018-11-17 00:52:58, "Markus Armbruster" wrote: > >>Li Qiang writes: > >> > >>> Currently the user can set a negative reboot_timeout. > >>> Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then > >>> convert

Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-18 Thread Markus Armbruster
ÀîÇ¿ writes: > At 2018-11-17 00:52:58, "Markus Armbruster" wrote: >>Li Qiang writes: >> >>> Currently the user can set a negative reboot_timeout. >>> Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then >>> convert it to number. >> >>Again, it's not wrong per se, just

Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-18 Thread 李强
At 2018-11-17 00:52:58, "Markus Armbruster" wrote: >Li Qiang writes: > >> Currently the user can set a negative reboot_timeout. >> Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then >> convert it to number. > >Again, it's not wrong per se, just needlessly

Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-16 Thread Markus Armbruster
Li Qiang writes: > Currently the user can set a negative reboot_timeout. > Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then > convert it to number. Again, it's not wrong per se, just needlessly complicated and error-prone. What makes it wrong is ... > convert it to

[Qemu-devel] [PATCH 2/2] hw: fw_cfg: refactor fw_cfg_reboot()

2018-11-09 Thread Li Qiang
Currently the user can set a negative reboot_timeout. Also it is wrong to parse 'reboot-timeout' with qemu_opt_get() and then convert it to number. This patch refactor this function by following: 1. ensure reboot_timeout is in 0~0x 2. use qemu_opt_get_number() to parse reboot_timeout 3.