2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

proc: Drop always true last argument of parse_smaps()

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-12-19 15:57:00 +03:00
parent 5e99d708ca
commit 6a6cdb8d4a
3 changed files with 6 additions and 11 deletions

View File

@@ -196,9 +196,6 @@ static int vma_get_mapfile(struct vma_area *vma, DIR *mfd,
{
char path[32];
if (!mfd)
return 0;
if (prev_vfi->vma && vfi_equal(vfi, prev_vfi)) {
struct vma_area *prev = prev_vfi->vma;
@@ -292,7 +289,7 @@ int parse_self_maps_lite(struct vm_area_list *vms)
return 0;
}
int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, bool use_map_files)
int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list)
{
struct vma_area *vma_area = NULL;
unsigned long start, end, pgoff, prev_end = 0;
@@ -316,11 +313,9 @@ int parse_smaps(pid_t pid, struct vm_area_list *vma_area_list, bool use_map_file
if (bfdopen(&f, O_RDONLY))
goto err_n;
if (use_map_files) {
map_files_dir = opendir_proc(pid, "map_files");
if (!map_files_dir) /* old kernel? */
goto err;
}
map_files_dir = opendir_proc(pid, "map_files");
if (!map_files_dir) /* old kernel? */
goto err;
while (1) {
int num;