[CRIU] [PATCH 1/7] image: Refine open_image helpers

Pavel Emelyanov xemul at parallels.com
Thu Mar 13 03:39:50 PDT 2014


On 03/13/2014 02:30 PM, Cyrill Gorcunov wrote:
> 
> Because we're merging image files one into another
> for backward compatibility we need to try to access
> old image files without producing error message if
> such image file doesn't exist.
> 
> Thus alternate open_image to take @optional argument,
> which makes it exit with -ENOENT error code but don't
> print any error message if file doesn't exits.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  image.c         |  4 +++-
>  include/image.h | 15 +++++++++++++--
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 


Just make existing open_image_at() report -ENOENT in case
of image is missing. No need in separate fn.


More information about the CRIU mailing list