Skip to content

Commit

Permalink
Remove error logs for ignored or otherwise logged subprocess exits.
Browse files Browse the repository at this point in the history
Errors in early restore.log for status=1 from a subprocess are confusing,
esp. that they don't show what command failed. Since the result is
either ignored or logged anyway, mark the calls as "can fail".

Signed-off-by: Michał Mirosław <emmir@google.com>
  • Loading branch information
osctobe committed Jun 14, 2023
1 parent e11898e commit 661a11c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions criu/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ void preload_netfilter_modules(void)
fd = -1;
pr_perror("failed to open /dev/null, using log fd for net module preload");
}
cr_system(fd, fd, fd, iptable_cmd_ipv4, (char *[]){ iptable_cmd_ipv4, "-L", "-n", NULL }, 0);
cr_system(fd, fd, fd, iptable_cmd_ipv6, (char *[]){ iptable_cmd_ipv6, "-L", "-n", NULL }, 0);
cr_system(fd, fd, fd, iptable_cmd_ipv4, (char *[]){ iptable_cmd_ipv4, "-L", "-n", NULL }, CRS_CAN_FAIL);
cr_system(fd, fd, fd, iptable_cmd_ipv6, (char *[]){ iptable_cmd_ipv6, "-L", "-n", NULL }, CRS_CAN_FAIL);
close_safe(&fd);
}

Expand Down
2 changes: 1 addition & 1 deletion criu/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ static int is_iptables_nft(char *bin)
goto err;
}

ret = cr_system(-1, pfd[1], -1, cmd[0], cmd, 0);
ret = cr_system(-1, pfd[1], -1, cmd[0], cmd, CRS_CAN_FAIL);
if (ret) {
pr_err("%s -V failed\n", cmd[0]);
goto err;
Expand Down

0 comments on commit 661a11c

Please sign in to comment.