[pve-devel] [PATCH qemu-server v3 2/6] fix #4225: qemuserver: introduce sub eject_nonrequired_isos
Fiona Ebner
f.ebner at proxmox.com
Mon Feb 3 10:00:51 CET 2025
Am 31.01.25 um 14:58 schrieb Daniel Herzig:
> Fiona Ebner <f.ebner at proxmox.com> writes:
>
>> Am 31.01.25 um 10:36 schrieb Fiona Ebner:
>>> Am 30.01.25 um 12:31 schrieb Daniel Herzig:
>>>> +
>>>> + $drive->{essential} = 1 if !defined($drive->{essential});
>>>
>>> This should rather be done when parsing the drive.
>>
>> Or I guess to avoid (potentially) writing it out for every drive, it
>> should only be a local variable here and not set in the drive hash.
>
> Thanks, I'll double check on this for v4. But I'd assume the hash to be scoped to
> `config_to_command` here, or am I missing something?
>
But you don't need the modified version in config_to_command() later,
or? And if yes, that can just check the same way again, i.e. using
default value if not set. If we want to explicitly set the value, that
should happen during parsing the drive string. Most of the time it's
surprising to implicitly modify a passed-in value. Better to either
avoid that or if really necessary, explicitly mention it in the function
description.
More information about the pve-devel
mailing list