From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12877 invoked from network); 3 Sep 2020 15:51:32 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Sep 2020 15:51:32 -0000 Received: (qmail 11669 invoked by uid 550); 3 Sep 2020 15:51:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11651 invoked from network); 3 Sep 2020 15:51:30 -0000 Date: Thu, 3 Sep 2020 11:51:18 -0400 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200903155118.GB3265@brightrain.aerifal.cx> References: <20200903112309.102601-1-sorear@fastmail.com> <20200903112309.102601-6-sorear@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH 05/14] Add src/internal/statx.h On Thu, Sep 03, 2020 at 05:39:51PM +0200, Arnd Bergmann wrote: > On Thu, Sep 3, 2020 at 1:24 PM Stefan O'Rear wrote: > > > > We need to make internal syscalls to SYS_statx when SYS_fstatat is not > > available without changing the musl API. > > --- > > src/internal/statx.h | 28 ++++++++++++++++++++++++++++ > > src/stat/fstatat.c | 28 ++-------------------------- > > 2 files changed, 30 insertions(+), 26 deletions(-) > > create mode 100644 src/internal/statx.h > > > > diff --git a/src/internal/statx.h b/src/internal/statx.h > > new file mode 100644 > > index 00000000..46b16f62 > > --- /dev/null > > +++ b/src/internal/statx.h > > @@ -0,0 +1,28 @@ > > +struct statx { > > + uint32_t stx_mask; > > + uint32_t stx_blksize; > > + uint64_t stx_attributes; > > + uint32_t stx_nlink; > > + uint32_t stx_uid; > > + uint32_t stx_gid; > > + uint16_t stx_mode; > > + uint16_t pad1; > > + uint64_t stx_ino; > > + uint64_t stx_size; > > + uint64_t stx_blocks; > > + uint64_t stx_attributes_mask; > > + struct { > > + int64_t tv_sec; > > + uint32_t tv_nsec; > > + int32_t pad; > > + } stx_atime, stx_btime, stx_ctime, stx_mtime; > > + uint32_t stx_rdev_major; > > + uint32_t stx_rdev_minor; > > + uint32_t stx_dev_major; > > + uint32_t stx_dev_minor; > > + uint64_t spare[14]; > > +}; > > Unrelated to your patch that just moves this, I notice that > the kernel version has gained an stx_mnt_id field. This could potentially be added, but should be a separate change, and really only makes sense if/when we put this in a public header since nothing internal is using it. Rich