mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-04-29 20:56:26 +00:00
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:
parent
0d1ffe0769
commit
747c4df31a
@ -688,7 +688,7 @@ int open_at_same(int fd_same, int dfd, const char *path, unsigned int o_flags,
|
|||||||
return move_fd(fd);
|
return move_fd(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fd_make_nonblocking(int fd)
|
int fd_make_blocking(int fd)
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ __hidden extern int open_at_same(int fd_same, int dfd, const char *path,
|
|||||||
unsigned int o_flags,
|
unsigned int o_flags,
|
||||||
unsigned int resolve_flags, mode_t mode);
|
unsigned int resolve_flags, mode_t mode);
|
||||||
__hidden extern int open_beneath(int dfd, const char *path, unsigned int flags);
|
__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,
|
__hidden extern char *read_file_at(int dfd, const char *fnam,
|
||||||
unsigned int o_flags,
|
unsigned int o_flags,
|
||||||
unsigned resolve_flags);
|
unsigned resolve_flags);
|
||||||
|
@ -1282,8 +1282,8 @@ int lxc_seccomp_load(struct lxc_conf *conf)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd_make_nonblocking(ret))
|
if (fd_make_blocking(ret))
|
||||||
return log_error_errno(-1, errno, "Failed to make seccomp listener fd non-blocking");;
|
return log_error_errno(-1, errno, "Failed to make seccomp listener fd blocking");
|
||||||
|
|
||||||
conf->seccomp.notifier.notify_fd = ret;
|
conf->seccomp.notifier.notify_fd = ret;
|
||||||
TRACE("Retrieved new seccomp listener fd %d", ret);
|
TRACE("Retrieved new seccomp listener fd %d", ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user