[Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-11-23 Thread Markus Armbruster
pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily creates a drive without a medium. When pc_system_flash_init() asks for its size, bdrv_getlength() fails with -ENOMEDIUM, which isn't checked either. It fails relatively cleanly only because -ENOMEDIUM isn't a multiple of 4096:

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Luiz Capitulino
On Thu, 16 Aug 2012 17:12:37 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 16 Aug 2012 16:32:12 +0200 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Thu, 16 Aug 2012 15:50:51 +0200 > >> > Markus Armbruster wrote: > >> > > >> >> Luiz Cap

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Luiz Capitulino
On Thu, 16 Aug 2012 13:49:15 -0300 Luiz Capitulino wrote: > > I converted more error messages to the error-reporting-infrastructure- > > du-jour than was enjoyable, and I can tell you that the restrictions > > that come with error_report() compared to anything-goes-fprintf() do > > make the job e

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Jordan Justen
Reviewed-by: Jordan Justen On Thu, Aug 16, 2012 at 4:41 AM, Markus Armbruster wrote: > pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily > creates a drive without a medium. > > When pc_system_flash_init() asks for its size, bdrv_getlength() fails > with -ENOMEDIUM, which isn't

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 16 Aug 2012 16:32:12 +0200 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Thu, 16 Aug 2012 15:50:51 +0200 >> > Markus Armbruster wrote: >> > >> >> Luiz Capitulino writes: >> >> >> >> > On Thu, 16 Aug 2012 13:41:12 +0200 >> >> > Markus Ar

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Luiz Capitulino
On Thu, 16 Aug 2012 16:32:12 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 16 Aug 2012 15:50:51 +0200 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Thu, 16 Aug 2012 13:41:12 +0200 > >> > Markus Armbruster wrote: > >> > > >> >> pc_fw_ad

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 16 Aug 2012 15:50:51 +0200 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Thu, 16 Aug 2012 13:41:12 +0200 >> > Markus Armbruster wrote: >> > >> >> pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily >> >> creates a drive w

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Luiz Capitulino
On Thu, 16 Aug 2012 15:50:51 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 16 Aug 2012 13:41:12 +0200 > > Markus Armbruster wrote: > > > >> pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily > >> creates a drive without a medium. > >> > >> When pc_sy

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Kevin Wolf
Am 16.08.2012 15:50, schrieb Markus Armbruster: >> Although I'm not sure it qualifies for hard-freeze... > > I didn't tag my series "for-1.2". I understand that fixes to > not-so-important stuff aren't welcome at this time even when they're > really simple. It's a clear bug fix, easy to understa

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 16 Aug 2012 13:41:12 +0200 > Markus Armbruster wrote: > >> pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily >> creates a drive without a medium. >> >> When pc_system_flash_init() asks for its size, bdrv_getlength() fails >> with -ENOMEDIUM,

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Luiz Capitulino
On Thu, 16 Aug 2012 13:41:12 +0200 Markus Armbruster wrote: > pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily > creates a drive without a medium. > > When pc_system_flash_init() asks for its size, bdrv_getlength() fails > with -ENOMEDIUM, which isn't checked either. It fail

[Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Markus Armbruster
pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily creates a drive without a medium. When pc_system_flash_init() asks for its size, bdrv_getlength() fails with -ENOMEDIUM, which isn't checked either. It fails relatively cleanly only because -ENOMEDIUM isn't a multiple of 4096: