[CRIU] [PATCH 3/3] fsnotify: print correct error if open_by_handle_at failed

Pavel Emelyanov xemul at parallels.com
Tue Feb 25 00:01:52 PST 2014


On 02/24/2014 06:11 PM, Andrey Vagin wrote:
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  fsnotify.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fsnotify.c b/fsnotify.c
> index c91f184..55f02d8 100644
> --- a/fsnotify.c
> +++ b/fsnotify.c
> @@ -117,9 +117,11 @@ static int open_handle(unsigned int s_dev, unsigned long i_ino,
>  	}
>  
>  	fd = sys_open_by_handle_at(mntfd, (void *)&handle, 0);
> -	if (fd < 0)
> +	if (fd < 0) {
> +		errno = -fd;
>  		pr_perror("Can't open file handle for 0x%08x:0x%016lx",
>  				s_dev, i_ino);
> +	}
>  
>  	close(mntfd);
>  out:
> 


applied


More information about the CRIU mailing list