[CRIU] Re: [PATCH cr 2/2] util: remove open_image_ro_nocheck

Andrew Vagin avagin at parallels.com
Wed Mar 21 03:53:52 EDT 2012


On Wed, Mar 21, 2012 at 11:07:06AM +0400, Pavel Emelyanov wrote:
> On 03/21/2012 09:45 AM, Andrey Vagin wrote:
> > 
> > It looks like a hack
> 
> How does this correlate to Stas' patches about global images opening?
They are intersect in one place.

> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1320,7 +1320,7 @@ static int restore_task_with_children(void
> *_arg)
>  
>       pr_info("%d: Starting restore\n", me->pid);
>  
> -     fd = open_image_ro_nocheck(FMT_FNAME_PSTREE, pstree_pid);
> +     fd = open_glob_image_ro_nocheck(FMT_FNAME_PSTREE);
after my patches it should be like this:
	fd = open_glob_image_ro(FMT_FNAME_PSTREE);
>       if (fd < 0) {
>               pr_perror("%d: Can't reopen pstree image", me->pid);
>               exit(1);

> 
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> > ---
> >  cr-restore.c      |    7 +++----
> >  include/crtools.h |    1 -
> >  restorer.c        |    2 --
> >  util.c            |   13 -------------
> >  4 files changed, 3 insertions(+), 20 deletions(-)
> > 
> 


More information about the CRIU mailing list