From: Tom Rini <trini@konsulko.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: "Simon Glass" <sjg@chromium.org>,
"Huang Jianan" <jnhuang95@gmail.com>,
"Quentin Schulz" <quentin.schulz@cherry.de>,
"Tony Dinh" <mibodhi@gmail.com>,
"Timo tp Preißl" <t.preissl@proton.me>,
"Francois Berder" <fberder@outlook.fr>,
"Andrew Goodbody" <andrew.goodbody@linaro.org>,
"Daniel Palmer" <daniel@thingy.jp>,
"Varadarajan Narayanan" <varadarajan.narayanan@oss.qualcomm.com>,
"Sughosh Ganu" <sughosh.ganu@arm.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Peng Fan" <peng.fan@nxp.com>,
"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
u-boot@lists.denx.de, linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH 3/9] fs: ext4: print change date in directory listing
Date: Fri, 29 May 2026 14:01:12 -0600 [thread overview]
Message-ID: <20260529200112.GA694169@bill-the-cat> (raw)
In-Reply-To: <73acbfa7-43aa-4d65-b7ba-1824fda3b348@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 2442 bytes --]
On Thu, May 21, 2026 at 02:46:51AM +0200, Heinrich Schuchardt wrote:
> On 5/20/26 22:42, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Mon, 18 May 2026 at 00:57, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> > >
> > > Declare FS_CAP_DATE in the ext4 fstype_info entry so that fs_ls_generic()
> > > displays the modification date alongside the file size:
> > >
> > > 4096 2024-03-15 09:30 filename.txt
> > >
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > ---
> > > fs/fs.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/fs/fs.c b/fs/fs.c
> > > index f8e4794c10e..482a5523712 100644
> > > --- a/fs/fs.c
> > > +++ b/fs/fs.c
> > > @@ -261,6 +261,9 @@ static struct fstype_info fstypes[] = {
> > > .fstype = FS_TYPE_EXT,
> > > .name = "ext4",
> > > .null_dev_desc_ok = false,
> > > +#if !IS_ENABLED(CONFIG_XPL_BUILD)
> > > + .caps = FS_CAP_DATE,
> > > +#endif
> > > .probe = ext4fs_probe,
> > > .close = ext4fs_close,
> > > .ls = fs_ls_generic,
> > > --
> > > 2.53.0
> > >
> >
> > I would prefer having a head-file macro which expands to nothing for
> > xPL builds, rather than adding preprocessor macros.
> >
> > Regards,
> > Simon
>
> Hello Simon,
>
> In the internet I could not find what a "head-file macro" might be.
>
> As struct fstype_info is not defined in a header file, a preprocessor macro
> defined in a header file would not make sense here.
>
> Do you mean something like:
>
> #if IS_ENABLED(CONFIG_XPL_BUILD)
> #define FS_CAPS(flags) /* empty */
> #else
> #define FS_CAPS(flags) .caps = (flags),
> #endif
>
> static struct fstype_info fstypes[] = {
> #if CONFIG_IS_ENABLED(FS_FAT)
> {
> .fstype = FS_TYPE_FAT,
> .name = "fat",
> .null_dev_desc_ok = false,
> FS_CAPS(FS_CAP_DATE)
> .probe = fat_set_blk_dev,
> ...
>
> A line without a comma in the initializer is easily mistaken as incorrect. I
> am not sure that a code reviewers life is made easier with defining a new
> preprocessor macro.
We have a lot of other examples like this in-tree already such as
ENV_NAME(..) so I think it's reasonable to make an FS_CAPS macro like
this.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-05-29 20:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 5:57 [PATCH 0/9] fs: add change date to ls output Heinrich Schuchardt
2026-05-18 5:57 ` [PATCH 1/9] fs: move struct fstype_info definition to top of file Heinrich Schuchardt
2026-05-19 18:55 ` Simon Glass
2026-05-18 5:57 ` [PATCH 2/9] fs: print change date in directory listing for FAT Heinrich Schuchardt
2026-05-19 19:59 ` Simon Glass
2026-05-18 5:57 ` [PATCH 3/9] fs: ext4: print change date in directory listing Heinrich Schuchardt
2026-05-20 20:42 ` Simon Glass
2026-05-21 0:46 ` Heinrich Schuchardt
2026-05-21 15:38 ` Simon Glass
2026-05-29 20:01 ` Tom Rini [this message]
2026-05-18 5:57 ` [PATCH 4/9] fs: ext4: don't read time fields in XPL Heinrich Schuchardt
2026-05-19 20:03 ` Simon Glass
2026-05-18 5:57 ` [PATCH 5/9] fs: ext4: set inode timestamps on write Heinrich Schuchardt
2026-05-19 20:00 ` Simon Glass
2026-05-18 5:57 ` [PATCH 6/9] test: Probe RTC early in dm_test_host() Heinrich Schuchardt
2026-05-19 20:00 ` Simon Glass
2026-05-18 5:57 ` [PATCH 7/9] test: fs: allow optional date field in ls output assertion Heinrich Schuchardt
2026-05-19 20:00 ` Simon Glass
2026-05-18 5:57 ` [PATCH 8/9] test: env: " Heinrich Schuchardt
2026-05-19 20:00 ` Simon Glass
2026-05-18 5:57 ` [PATCH 9/9] test: test_erofs: adjust expected ls output Heinrich Schuchardt
2026-05-19 20:00 ` Simon Glass
2026-05-18 18:15 ` [PATCH 0/9] fs: add change date to " Tom Rini
2026-05-19 7:25 ` Heinrich Schuchardt
2026-05-19 13:55 ` Tom Rini
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=20260529200112.GA694169@bill-the-cat \
--to=trini@konsulko.com \
--cc=andrew.goodbody@linaro.org \
--cc=daniel@thingy.jp \
--cc=fberder@outlook.fr \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jnhuang95@gmail.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mibodhi@gmail.com \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@arm.com \
--cc=t.preissl@proton.me \
--cc=u-boot@lists.denx.de \
--cc=varadarajan.narayanan@oss.qualcomm.com \
/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