[CRIU] [PATCH 1/7] image: Refine open_image helpers
Cyrill Gorcunov
gorcunov at gmail.com
Fri Mar 14 03:56:41 PDT 2014
On Fri, Mar 14, 2014 at 02:44:06PM +0400, Pavel Emelyanov wrote:
> On 03/13/2014 04:10 PM, Cyrill Gorcunov wrote:
> > On Thu, Mar 13, 2014 at 03:46:02PM +0400, Pavel Emelyanov wrote:
> >>
> >> OK, let's say that some flag (O_EXCL? O_SMTHELSE) to denote
> >> the optionality of an image. Not the whole new call.
> >
> > Like this? (If you accept it, substitude this patch with
> > attached and I'll update the 7th patch as well).
> >
>
> Would you grep the rest of the code for checking errno == ENOENT
> to check the new ret code. Thanks.
Look, the new error code is returned only if O_OPT flag passed
if (ret < 0) {
+ if (optional && errno == ENOENT)
+ return -ENOENT;
thus all previous callers remain the same. Or you propose to
update open_image_at and return -ENOENT regardless of @optional
setting? (this won't cause any problem, because all callers do
check for negative ret and test errno then).
More information about the CRIU
mailing list