mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 01:54:28 +00:00
dump: Rename try_dump_socket
Try meant that it might not be a socket, but with local fds we do know it for sure. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
ecc0b90992
commit
8ecb454bf7
3 changed files with 4 additions and 8 deletions
|
|
@ -352,12 +352,8 @@ static int dump_one_fd(pid_t pid, int fd, int lfd,
|
|||
goto out_close;
|
||||
}
|
||||
|
||||
if (S_ISSOCK(fd_stat.st_mode)) {
|
||||
err = try_dump_socket(pid, fd, cr_fdset, sk_queue);
|
||||
if (err)
|
||||
pr_perror("Failed to open %d", fd);
|
||||
return err;
|
||||
}
|
||||
if (S_ISSOCK(fd_stat.st_mode))
|
||||
return dump_socket(pid, fd, cr_fdset, sk_queue);
|
||||
|
||||
fill_fd_params(pid, fd, lfd, &p);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct sk_queue {
|
|||
};
|
||||
|
||||
struct cr_fdset;
|
||||
extern int try_dump_socket(pid_t pid, int fd, const struct cr_fdset *cr_fdset,
|
||||
extern int dump_socket(pid_t pid, int fd, const struct cr_fdset *cr_fdset,
|
||||
struct sk_queue *queue);
|
||||
|
||||
extern int collect_sockets(void);
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ err:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int try_dump_socket(pid_t pid, int fd, const struct cr_fdset *cr_fdset,
|
||||
int dump_socket(pid_t pid, int fd, const struct cr_fdset *cr_fdset,
|
||||
struct sk_queue *queue)
|
||||
{
|
||||
struct socket_desc *sk;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue