[CRIU] Re: [PATCH cr 04/16] restore: split read_and_open_vmas into parts read_vmas and open_vmas

Pavel Emelyanov xemul at parallels.com
Tue Oct 30 12:12:31 EDT 2012


> @@ -203,7 +203,22 @@ static int read_and_open_vmas(int pid, struct list_head *vmas, int *nr_vmas)
>  
>  		vma->vma = *e;
>  		vma_entry__free_unpacked(e, NULL);
> +	}
> +
> +	close(fd);
> +	return ret;
> +}
> +
> +static int open_vmas(int pid, struct list_head *vmas)
> +{
> +	struct vma_area *vma;
> +	int fd, ret = -1;
>  
> +	fd = open_image_ro(CR_FD_VMAS, pid);

What is this open_image for?

> +	if (fd < 0)
> +		return fd;
> +
> +	list_for_each_entry(vma, vmas, list) {
>  		if (!(vma_entry_is(&vma->vma, VMA_AREA_REGULAR)))
>  			continue;
>  


More information about the CRIU mailing list