mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
util: process: Don't report OOM errors in helper
virProcessTranslateStatus is used on error paths that should not spoil the returned error. As the errors are ignored, use the quiet versions of virAsprintf to create the message.
This commit is contained in:
parent
742b08e30f
commit
bc068034ba
@ -73,13 +73,13 @@ virProcessTranslateStatus(int status)
|
|||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
if (WIFEXITED(status)) {
|
if (WIFEXITED(status)) {
|
||||||
ignore_value(virAsprintf(&buf, _("exit status %d"),
|
ignore_value(virAsprintfQuiet(&buf, _("exit status %d"),
|
||||||
WEXITSTATUS(status)));
|
WEXITSTATUS(status)));
|
||||||
} else if (WIFSIGNALED(status)) {
|
} else if (WIFSIGNALED(status)) {
|
||||||
ignore_value(virAsprintf(&buf, _("fatal signal %d"),
|
ignore_value(virAsprintfQuiet(&buf, _("fatal signal %d"),
|
||||||
WTERMSIG(status)));
|
WTERMSIG(status)));
|
||||||
} else {
|
} else {
|
||||||
ignore_value(virAsprintf(&buf, _("invalid value %d"), status));
|
ignore_value(virAsprintfQuiet(&buf, _("invalid value %d"), status));
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user