mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-25 22:06:58 +00:00
tools: followup: fix comment length and rename to upid_normalize_status_type
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4e5360384c
commit
ae54eabff9
@ -1179,16 +1179,13 @@ sub upid_status_is_error {
|
|||||||
return !($status eq 'OK' || $status =~ m/^WARNINGS: \d+$/);
|
return !($status eq 'OK' || $status =~ m/^WARNINGS: \d+$/);
|
||||||
}
|
}
|
||||||
|
|
||||||
# takes the parsed status and returns the type,
|
# takes the parsed status and returns the type, either ok, warning, error or unknown
|
||||||
# either ok, warning, error or unknown
|
sub upid_normalize_status_type {
|
||||||
sub upid_get_status_type {
|
|
||||||
my ($status) = @_;
|
my ($status) = @_;
|
||||||
|
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
return 'unknown';
|
return 'unknown';
|
||||||
}
|
} elsif ($status eq 'OK') {
|
||||||
|
|
||||||
if ($status eq 'OK') {
|
|
||||||
return 'ok';
|
return 'ok';
|
||||||
} elsif ($status =~ m/^WARNINGS: \d+$/) {
|
} elsif ($status =~ m/^WARNINGS: \d+$/) {
|
||||||
return 'warning';
|
return 'warning';
|
||||||
|
Loading…
Reference in New Issue
Block a user