Re: [PATCH v2 04/17] qemu: Improve qemuDomainDefaultSCSIControllerModel()

2024-02-15 Thread Peter Krempa
On Thu, Feb 15, 2024 at 05:46:28 -0800, Andrea Bolognani wrote: > On Thu, Feb 15, 2024 at 01:57:27PM +0100, Peter Krempa wrote: > > On Wed, Feb 14, 2024 at 18:11:11 +0100, Andrea Bolognani wrote: > > > In order to have a nice API while still keeping the > > > implementation short and readable, a sm

Re: [PATCH v2 04/17] qemu: Improve qemuDomainDefaultSCSIControllerModel()

2024-02-15 Thread Andrea Bolognani
On Thu, Feb 15, 2024 at 01:57:27PM +0100, Peter Krempa wrote: > On Wed, Feb 14, 2024 at 18:11:11 +0100, Andrea Bolognani wrote: > > In order to have a nice API while still keeping the > > implementation short and readable, a small wrapper is required. > > Well arguably the wrapper is not needed unl

Re: [PATCH v2 04/17] qemu: Improve qemuDomainDefaultSCSIControllerModel()

2024-02-15 Thread Peter Krempa
On Wed, Feb 14, 2024 at 18:11:11 +0100, Andrea Bolognani wrote: > Make the helper stateless. This requires the caller to check > whether it needs to be called in the first place instead of > adding this check inside the function, which makes for more > readable, if a little more verbose, code. > >

[PATCH v2 04/17] qemu: Improve qemuDomainDefaultSCSIControllerModel()

2024-02-14 Thread Andrea Bolognani
Make the helper stateless. This requires the caller to check whether it needs to be called in the first place instead of adding this check inside the function, which makes for more readable, if a little more verbose, code. At the same time, change it so that it uses an out argument to return the s