X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FTools.pm;fp=src%2FPVE%2FTools.pm;h=807bc031a7ff84f6f9114810e7193d07d5d7e477;hp=7cca4a48b5e9394f150844adaa81f9816c1a923b;hb=ae54eabff90943218a165e61d5c04aec6ae048a3;hpb=4e5360384c3d51711bd4d69eff639a4fcd73dc6a diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 7cca4a4..807bc03 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -1179,16 +1179,13 @@ sub upid_status_is_error { return !($status eq 'OK' || $status =~ m/^WARNINGS: \d+$/); } -# takes the parsed status and returns the type, -# either ok, warning, error or unknown -sub upid_get_status_type { +# takes the parsed status and returns the type, either ok, warning, error or unknown +sub upid_normalize_status_type { my ($status) = @_; if (!$status) { return 'unknown'; - } - - if ($status eq 'OK') { + } elsif ($status eq 'OK') { return 'ok'; } elsif ($status =~ m/^WARNINGS: \d+$/) { return 'warning';