From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 64DB03858D32 for ; Mon, 30 Jan 2023 09:53:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64DB03858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x431.google.com with SMTP id ay1so7169771pfb.7 for ; Mon, 30 Jan 2023 01:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2GTT0WID/ZSj3jGctKvP5Pgf27P7LUWl1L1v3GE2iMA=; b=qSeMmvwmrT8OrDDek3KiUL8mBQMKrCfhZa4xXTSZqGVdxNgOvyFMD9i/c1xE+5zIl6 aOyNRkDhih5JCsALAwE1UJ/wkq/Qc6yZIHzpz183kz9FvjItEgvWu8TUeY8HdliBKkP2 0mvSRjSd6IuxubEB43yrqmgmMtRDvr2rV2STshkdSW/jBAa0xcEh2whtZWTWfLlD2xel vK+j5ZSBHLUsVbTGyHivkhjeQQHYtI1gNSGtm4p2I7hnDdWPt9v2Wt720+rUAMZ6u4zt cM1ferqh/bT7KWcYQqvh9d93aEF0tMptQuQjtHdB7YWL3gnDP3NmNxd1B0RSGBjxczCE 1h0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2GTT0WID/ZSj3jGctKvP5Pgf27P7LUWl1L1v3GE2iMA=; b=zh6dks0beKvAEb7URs8qnHH/9GhkgDEbN7zd2PsQq9awMkGMXRDva2vZB4AcEN4F1J AacJ/OLxMsF9vq8M1fwjWyVVBXNnJv2TpUWkAFAqkaattYIEaI/ZsteF+Dkj8GjFLUoq hHghbO2J4DF3FTX47UhBFaeXbI2ex22oGqjMUrQgNGVNe5WymsdafPeot5rAn3jJoSj9 D2/A9hF7BX8VTDF9rDtkQS5Fhr1LA85F5HY4PjvbAdzOdUVULUFvYF6YWQLzPqamJqJU d9dqCb5XBuB27Skzl+HYAqGtLW4S/U597TqSHn6SMTTJOzJ+u6BiImt9t2+fsRg2oTgk D6kA== X-Gm-Message-State: AFqh2krDozG4tTJe5VlbX2Sy5dV1nqoI1GajVF/JwRDLzKHJWkLnOiNT Fc4VEUH8GtbfVrpREJG8rxlNLSwBs73YHwND+t+t4RCt34I= X-Google-Smtp-Source: AMrXdXtrLvvpddrIzFE7HtyYxlVnNbJKD3OxASGjwMp2m6CkN6sgIyi/DBm/S8xYv3Orxt5bdLjLiXo7VZ9x3BIgwX8= X-Received: by 2002:a63:c052:0:b0:477:27f7:794a with SMTP id z18-20020a63c052000000b0047727f7794amr5102438pgi.58.1675072393246; Mon, 30 Jan 2023 01:53:13 -0800 (PST) MIME-Version: 1.0 References: <20221212114636.74222-1-bugaevc@gmail.com> <20221212114636.74222-3-bugaevc@gmail.com> <20230129232542.ns72yrj7vg2djpon@begin> In-Reply-To: <20230129232542.ns72yrj7vg2djpon@begin> From: Sergey Bugaev Date: Mon, 30 Jan 2023 12:53:02 +0300 Message-ID: Subject: Re: [RFC PATCH 2/3] hurd: Implement O_TMPFILE To: Samuel Thibault Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Jan 30, 2023 at 2:25 AM Samuel Thibault w= rote: > > Hello, > > Sergey Bugaev, le lun. 12 d=C3=A9c. 2022 14:46:35 +0300, a ecrit: > > diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fc= ntl.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