file_utils: rename fd_make_nonblocking to fd_make_blocking

Currently, fd_make_nonblocking does exactly the opposite thing,
it clears O_NONBLOCK flag and makes fd blocking.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
This commit is contained in:
Alexander Mikhalitsyn 2023-04-21 18:08:27 +02:00
parent 0d1ffe0769
commit 747c4df31a
No known key found for this signature in database
GPG Key ID: B1F47F5CB05B4FA3
3 changed files with 4 additions and 4 deletions

View File

@ -688,7 +688,7 @@ int open_at_same(int fd_same, int dfd, const char *path, unsigned int o_flags,
return move_fd(fd);
}
int fd_make_nonblocking(int fd)
int fd_make_blocking(int fd)
{
int flags;

View File

@ -109,7 +109,7 @@ __hidden extern int open_at_same(int fd_same, int dfd, const char *path,
unsigned int o_flags,
unsigned int resolve_flags, mode_t mode);
__hidden extern int open_beneath(int dfd, const char *path, unsigned int flags);
__hidden int fd_make_nonblocking(int fd);
__hidden int fd_make_blocking(int fd);
__hidden extern char *read_file_at(int dfd, const char *fnam,
unsigned int o_flags,
unsigned resolve_flags);

View File

@ -1282,8 +1282,8 @@ int lxc_seccomp_load(struct lxc_conf *conf)
return -1;
}
if (fd_make_nonblocking(ret))
return log_error_errno(-1, errno, "Failed to make seccomp listener fd non-blocking");;
if (fd_make_blocking(ret))
return log_error_errno(-1, errno, "Failed to make seccomp listener fd blocking");
conf->seccomp.notifier.notify_fd = ret;
TRACE("Retrieved new seccomp listener fd %d", ret);