Re: [PATCH V3 5/4] 9p: fix cache option printing in v9fs_show_options

From: Al Viro

Date: Wed Dec 03 2025 - 13:04:33 EST


On Thu, Dec 04, 2025 at 12:04:21AM +0900, Dominique Martinet wrote:
> Eric Sandeen wrote on Tue, Dec 02, 2025 at 07:09:42PM -0600:
> > >> - seq_printf(m, ",cache=%x", v9ses->cache);
> > >> + seq_printf(m, ",cache=0x%x", v9ses->cache);
> > >
> > > What's wrong with "cache=%#x"?
> >
> > Nothing, presumably - I did not know this existed TBH.
> >
> > (looks like that usage is about 1/10 of 0x%x currently)
>
> I don't have any preference here, but I've folded in %#x when applying
> because why not -- I've been seeing it slightly more often lately so I
> guess it's the "modern way" of doing this.

In 4BSD libc by October 1980, part of ANSI C variants all way back to C89.
Covered in K&R 2nd edition ('88); 3BSD didn't have it, neither did v7,
so I'd guess that it was done at some point in 1980, possibly late 1979.

So it's hardly something newfangled...