[CRIU] [PATCH 6/7] prepare_sigactions(): use pr_perror()

Kir Kolyshkin kir at openvz.org
Wed Oct 7 22:38:57 PDT 2015



On 10/07/2015 12:05 PM, Andrey Wagin wrote:
>
> Moi
> On Oct 7, 2015 7:25 PM, "Kir Kolyshkin" <kir at openvz.org 
> <mailto:kir at openvz.org>> wrote:
> >
> > Signed-off-by: Kir Kolyshkin <kir at openvz.org <mailto:kir at openvz.org>>
> > ---
> >  cr-restore.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/cr-restore.c b/cr-restore.c
> > index 33205e4..1abfd16 100644
> > --- a/cr-restore.c
> > +++ b/cr-restore.c
> > @@ -721,7 +721,7 @@ static int prepare_sigactions(void)
> >                  */
> >                 ret = sys_sigaction(sig, &act, NULL, 
> sizeof(k_rtsigset_t));
> >                 if (ret == -1) {
> > -                       pr_err("%d: Can't restore sigaction: %m\n", 
> pid);
> > +                       pr_perror("%d: Can't restore sigaction", pid);
>
> sys_* doesn't set errno
>

In this case it probably returns -E* code? If yes,
1. using %m (or  pr_perror()) is useless
2. ret == -1 check is wrong
3. to print error, we need something like strerror(-ret)

Or is it something different?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20151007/77f6276c/attachment.html>


More information about the CRIU mailing list