[pve-devel] [PATCH qemu-server] Fix #2390: Sort @ifaces array to avoid regeneration of instance-id
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Oct 18 21:37:27 CEST 2019
On 9/30/19 8:43 AM, Dominik Csapak wrote:
> hi, while this patch should work (did not test it),
> this can be done better
>
> we could do something like:
>
> ---8<---
> for (my $id = 0; $id < MAX_NETS; $id++) {
> my $iface = "net$id";
> next if !$conf->{$iface};
> --->8---
>
> this way we do not have to grep the whole conf
> and sort it afterwards, but have it always sorted by default
>
> (i know the code is not from you, but when we fix
> this, we could as well clean it up :) )
>
> where MAX_NETS comes from PVE::QemuServer (somehow)
>
> would you be willing to send a v2 with such a change,
> or would you prefer if i send it ?
>
Maybe you should send it, Dominik :)
More information about the pve-devel
mailing list