public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sergey Bugaev <bugaevc@gmail.com>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org
Subject: Re: [RFC PATCH 2/3] hurd: Implement O_TMPFILE
Date: Mon, 30 Jan 2023 12:53:02 +0300	[thread overview]
Message-ID: <CAN9u=Hcr5DM_P2Hc+r=Tm5UyOUeAr2LMnNpEK4R0fKckOkRo_Q@mail.gmail.com> (raw)
In-Reply-To: <20230129232542.ns72yrj7vg2djpon@begin>

On Mon, Jan 30, 2023 at 2:25 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
>
> Hello,
>
> Sergey Bugaev, le lun. 12 déc. 2022 14:46:35 +0300, a ecrit:
> > diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
> > index 17dcb384..b898a0c5 100644
> > --- a/sysdeps/mach/hurd/bits/fcntl.h
> > +++ b/sysdeps/mach/hurd/bits/fcntl.h
> > @@ -123,6 +123,11 @@
> >  # define O_CLOEXEC   0x00400000 /* Set FD_CLOEXEC.  */
> >  #endif
> >
> > +#ifdef __USE_GNU
> > +# define __O_TMPFILE 0x00800000 /* Make a new unnamed file.  */
> > +# define O_TMPFILE   (__O_TMPFILE | O_DIRECTORY)
> > +#endif
>
> I don't think we need the __O_TMPFILE variant, only the O_TMPFILE one?
>
> Linux uses __ variants just because it has per-arch definitions.

This was an attempt to mimic the Linux port's behavior, where it
automatically or's in O_DIRECTORY when you specify O_TMPFILE. Not that
it has any real meaning (at least for us) since my
__file_name_lookup_at () passes O_DIRECTORY automatically (instead of
any other flags) when O_TMPFILE is used. So should I remove this and
just have

# define O_TMPFILE 0x00800000 /* Make a new unnamed file.  */

?

Thanks for taking a look!

Sergey

  reply	other threads:[~2023-01-30  9:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 11:46 [RFC PATCH 0/3] O_TMPFILE and SHM_ANON for the Hurd Sergey Bugaev
2022-12-12 11:46 ` [RFC PATCH 1/3] hurd: Consolidate file_name_lookup implementation Sergey Bugaev
2022-12-12 11:46 ` [RFC PATCH 2/3] hurd: Implement O_TMPFILE Sergey Bugaev
2023-01-29 23:25   ` Samuel Thibault
2023-01-30  9:53     ` Sergey Bugaev [this message]
2023-01-30  9:59       ` Samuel Thibault
2023-01-30 12:52         ` [PATCH v2 0/3] O_TMPFILE and SHM_ANON for the Hurd Sergey Bugaev
2023-01-30 12:52         ` [PATCH v2 1/3] hurd: Consolidate file_name_lookup implementation Sergey Bugaev
2023-02-01 19:06           ` Samuel Thibault
2023-01-30 12:52         ` [PATCH v2 2/3] hurd: Implement O_TMPFILE Sergey Bugaev
2023-02-01 22:34           ` Samuel Thibault
2023-01-30 12:52         ` [PATCH v2 3/3] hurd: Implement SHM_ANON Sergey Bugaev
2023-02-01 22:36           ` Samuel Thibault
2022-12-12 11:46 ` [RFC PATCH " Sergey Bugaev
2023-01-29 23:31 ` [RFC PATCH 0/3] O_TMPFILE and SHM_ANON for the Hurd Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN9u=Hcr5DM_P2Hc+r=Tm5UyOUeAr2LMnNpEK4R0fKckOkRo_Q@mail.gmail.com' \
    --to=bugaevc@gmail.com \
    --cc=bug-hurd@gnu.org \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).