Re: [Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API

2018-08-13 Thread Stefan Hajnoczi
On Wed, Aug 8, 2018 at 10:32 PM Alistair Francis wrote: > On Fri, Aug 3, 2018 at 7:47 AM, Stefan Hajnoczi wrote: > > @@ -1168,6 +1172,34 @@ void rom_reset_order_override(void) > > fw_cfg_reset_order_override(fw_cfg); > > } > > > > +void rom_transaction_begin(void) > > +{ > > +Rom *rom;

Re: [Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API

2018-08-08 Thread Alistair Francis
On Fri, Aug 3, 2018 at 7:47 AM, Stefan Hajnoczi wrote: > Image file loaders may add a series of roms. If an error occurs partway > through loading there is no easy way to drop previously added roms. > > This patch adds a transaction mechanism that works like this: > > rom_transaction_begin(); >

[Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API

2018-08-03 Thread Stefan Hajnoczi
Image file loaders may add a series of roms. If an error occurs partway through loading there is no easy way to drop previously added roms. This patch adds a transaction mechanism that works like this: rom_transaction_begin(); ...call rom_add_*()... rom_transaction_end(ok); If ok is false