[pve-devel] [PATCH qemu-server v2 7/13] fix #5180: libexec: add QEMU dbus-vmstate daemon for migrating conntrack

Christoph Heiss c.heiss at proxmox.com
Wed Jun 11 12:44:45 CEST 2025


On Tue Jun 3, 2025 at 11:34 AM CEST, Stefan Hanreich wrote:
> On 4/24/25 13:19, Christoph Heiss wrote:
>> +sub Load {
>> +    my ($self, $bytes) = @_;
>> +
>> +    my $len = scalar(@$bytes);
>> +    return if $len <= 1; # see also the `Save` method
>> +
>> +    my $text = pack('c*', @$bytes);
>> +
>> +    eval {
>> +	PVE::Tools::run_command(
>> +	    ['conntrack', '--load-file', '-'],
>> +	    input => $text,
>> +	);
>> +    };
>> +    if (my $err = $@) {
>
> nit: could just use $@ directly here? some additional occurences below

Yeah indeed, just bit a muscle memory on my side, since it also avoids
accidentally overwriting/propagating the wrong error, in case $@ get's
set again, with $@ being quite magic.




More information about the pve-devel mailing list