diff --git a/mount.c b/mount.c index b7edae961..4ffb4132f 100644 --- a/mount.c +++ b/mount.c @@ -273,8 +273,11 @@ static int tmpfs_dump(struct mount_info *pm) } close(fd_img); - /* tmpfs is in another mount namespace, - * a direct path is inaccessible */ + /* + * tmpfs is in another mount namespace, + * a direct path is inaccessible + */ + snprintf(tmpfs_path, sizeof(tmpfs_path), "/proc/self/fd/%d", fd); @@ -780,8 +783,10 @@ int mntns_collect_root(pid_t pid) int ret; char path[PATH_MAX + 1]; - /* If /proc/pid/root links on '/', it signs that a root of the task - * and a root of mntns is the same. */ + /* + * If /proc/pid/root links on '/', it signs that a root of the task + * and a root of mntns is the same. + */ pfd = open_pid_proc(pid); ret = readlinkat(pfd, "root", path, sizeof(path) - 1); diff --git a/shmem.c b/shmem.c index 921889369..0d2549b97 100644 --- a/shmem.c +++ b/shmem.c @@ -179,7 +179,8 @@ int get_shmem_fd(int pid, VmaEntry *vi) if (si->fd != -1) return dup(si->fd); - /* The following hack solves problems: + /* + * The following hack solves problems: * vi->pgoff may be not zero in a target process. * This mapping may be mapped more then once. * The restorer doesn't have snprintf.