mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
net/sysctl: silence read error in case of CTL_FLAGS_READ_EIO_SKIP
Because stable_secret sysctl c/r produces a lot of spam error messages in tests: https://github.com/xemul/criu/issues/160 But EIO for these sysctl is valid behavior and no error need to be printed. More general solution will also silence error messages for sysctl_read_{u32,s32,u64}, but the flag CTL_FLAGS_READ_EIO_SKIP is now used only for __CTL_STR and only for stable_secret so we can do silence error only in sysctl_read_char. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Tested-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
5f9f130345
commit
178692e7b2
1 changed files with 2 additions and 1 deletions
|
|
@ -132,7 +132,8 @@ sysctl_read_char(int fd, struct sysctl_req *req, char *arg, int nr)
|
|||
pr_debug("%s nr %d\n", req->name, nr);
|
||||
ret = read(fd, arg, nr);
|
||||
if (ret < 0) {
|
||||
pr_perror("Can't read %s", req->name);
|
||||
if (errno != EIO || !(req->flags & CTL_FLAGS_READ_EIO_SKIP))
|
||||
pr_perror("Can't read %s", req->name);
|
||||
goto err;
|
||||
}
|
||||
ret = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue