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

2018-08-14 Thread Alistair Francis
On Tue, Aug 14, 2018 at 9:27 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 v6 4/6] loader: add rom transaction API

2018-08-14 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