also rename $add_error to $add_hotplug_error to differentiate between
apply_error (for vmconfig_apply_pending) and hotplug_error

Signed-off-by: Oguz Bektas <o.bek...@proxmox.com>
---
 PVE/QemuServer.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 1dc116b..d92040b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4827,9 +4827,9 @@ sub vmconfig_hotplug_pending {
     # Note: those option cannot raise errors, we we do not care about
     # $selection and always apply them.
 
-    my $add_error = sub {
+    my $add_hotplug_error = sub {
        my ($opt, $msg) = @_;
-       $errors->{$opt} = "hotplug problem - $msg";
+       $errors->{$opt} = "unable to hotplug $opt: $msg";
     };
 
     my $changes = 0;
@@ -4901,7 +4901,7 @@ sub vmconfig_hotplug_pending {
            }
        };
        if (my $err = $@) {
-           &$add_error($opt, $err) if $err ne "skip\n";
+           $add_hotplug_error->($opt, $err) if $err ne "skip\n";
        } else {
            # save new config if hotplug was successful
            delete $conf->{$opt};
@@ -4990,7 +4990,7 @@ sub vmconfig_hotplug_pending {
            }
        };
        if (my $err = $@) {
-           &$add_error($opt, $err) if $err ne "skip\n";
+           $add_hotplug_error->($opt, $err) if $err ne "skip\n";
        } else {
            # save new config if hotplug was successful
            $conf->{$opt} = $value;
-- 
2.20.1

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to