Commit e2d8aec7 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

files: Named constant for cwd fdinfo

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent b3c6742a
......@@ -148,7 +148,7 @@ static int dump_cwd(int pid_dir, struct cr_fdset *cr_fdset)
int ret = -1;
int fd;
struct fd_parms p = {
.fd_name = ~0L,
.fd_name = FDINFO_CWD,
.pos = 0,
.flags = 0,
.id = NULL,
......
......@@ -180,7 +180,7 @@ int prepare_fd_pid(int pid)
if (e.type == FDINFO_MAP)
continue;
if (e.addr == -1)
if (e.addr == FDINFO_CWD)
continue;
if (collect_fd(pid, &e))
return -1;
......@@ -529,12 +529,12 @@ int prepare_fds(int pid)
if (open_fmap(pid, &fe, fdinfo_fd))
goto err;
continue;
} else if (fe.addr == ~0L) {
} else if (fe.addr == FDINFO_CWD) {
if (restore_cwd(&fe, fdinfo_fd))
goto err;
continue;
}
} else if (fe.type == FDINFO_MAP || fe.addr == ~0L) {
} else if (fe.type == FDINFO_MAP || fe.addr == FDINFO_CWD) {
lseek(fdinfo_fd, fe.len, SEEK_CUR);
continue;
}
......
......@@ -17,6 +17,8 @@
#define FDINFO_FD 1
#define FDINFO_MAP 2
#define FDINFO_CWD (~0ULL)
#define PAGE_IMAGE_SIZE 4096
#define PAGE_RSS 1
#define PAGE_ANON 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment