<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 10/07/2015 12:05 PM, Andrey Wagin
wrote:<br>
</div>
<blockquote
cite="mid:CANaxB-wyss_S-1G5h9e=i2xBZsGh8BX5gbXZh-hAzAUcLFAa+w@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<p dir="ltr">Moi<br>
On Oct 7, 2015 7:25 PM, "Kir Kolyshkin" <<a
moz-do-not-send="true" href="mailto:kir@openvz.org"><a class="moz-txt-link-abbreviated" href="mailto:kir@openvz.org">kir@openvz.org</a></a>>
wrote:<br>
><br>
> Signed-off-by: Kir Kolyshkin <<a moz-do-not-send="true"
href="mailto:kir@openvz.org">kir@openvz.org</a>><br>
> ---<br>
> cr-restore.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/cr-restore.c b/cr-restore.c<br>
> index 33205e4..1abfd16 100644<br>
> --- a/cr-restore.c<br>
> +++ b/cr-restore.c<br>
> @@ -721,7 +721,7 @@ static int prepare_sigactions(void)<br>
> */<br>
> ret = sys_sigaction(sig, &act, NULL,
sizeof(k_rtsigset_t));<br>
> if (ret == -1) {<br>
> - pr_err("%d: Can't restore
sigaction: %m\n", pid);<br>
> + pr_perror("%d: Can't restore
sigaction", pid);</p>
<p dir="ltr">sys_* doesn't set errno</p>
</blockquote>
<br>
In this case it probably returns -E* code? If yes,<br>
1. using %m (or pr_perror()) is useless<br>
2. ret == -1 check is wrong<br>
3. to print error, we need something like strerror(-ret)<br>
<br>
Or is it something different?<br>
<br>
<br>
<br>
</body>
</html>