Am 28.11.2015 um 22:32 schrieb Mickaël Salaün: > Open the memory mapped file with the O_TMPFILE flag when available. > > Signed-off-by: Mickaël Salaün <m...@digikod.net> > --- > arch/um/os-Linux/mem.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c > index 798aeb4..fe52e2d 100644 > --- a/arch/um/os-Linux/mem.c > +++ b/arch/um/os-Linux/mem.c > @@ -106,6 +106,18 @@ static int __init make_tempfile(const char *template) > } > } > > +#ifdef O_TMPFILE > + fd = open(tempdir, O_CLOEXEC | O_RDWR | O_EXCL | O_TMPFILE, 0700); > + /* > + * If the running system does not support O_TMPFILE flag then retry > + * without it. > + */ > + if (fd != -1 || (errno != EINVAL && errno != EISDIR &&
Why are you handling EISDIR? > + errno != EOPNOTSUPP)) > + return fd; > + errno = 0; Why are you resetting errno? Thanks, //richard ------------------------------------------------------------------------------ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel