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

Cyrill Gorcunov gorcunov at gmail.com
Thu Mar 13 04:35:19 PDT 2014


On Thu, Mar 13, 2014 at 03:31:30PM +0400, Pavel Emelyanov wrote:
> >>
> >> Just make existing open_image_at() report -ENOENT in case
> >> of image is missing. No need in separate fn.
> > 
> > So who will be printing
> > 
> > 	pr_perror("Unable to open %s", path);
> 
> open_image()
> if (errno == ENOENT)
> 	pr_warn("missing image");
> 	return -ENOENT;

This should not be error or warning, that was the point.
Look, someone start "show" action on new image format,
why should there be "missing image" warning yielded?

Don't get me wrong, it's not a problem to update
open_image_at I just think it wont be convenient.
Or maybe I misunderstand you and you propose to
drop pr_perror from open_image_at body itself and
leave error message to be produced by a caller instead?


More information about the CRIU mailing list