[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21395.1532735340@warthog.procyon.org.uk>
Date: Sat, 28 Jul 2018 00:49:00 +0100
From: David Howells <dhowells@...hat.com>
To: Jann Horn <jannh@...gle.com>
Cc: dhowells@...hat.com, Al Viro <viro@...iv.linux.org.uk>,
Linux API <linux-api@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org,
kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 34/38] vfs: syscall: Add fsinfo() to query filesystem information [ver #10]
Jann Horn <jannh@...gle.com> wrote:
> > +static int fsinfo_generic_name_encoding(struct dentry *dentry, char *buf)
> > +{
> > + static const char encoding[] = "utf8";
> > +
> > + if (buf)
> > + memcpy(buf, encoding, sizeof(encoding) - 1);
> > + return sizeof(encoding) - 1;
> > +}
>
> Is this meant to be "encoding to be used by userspace" or "encoding of
> on-disk filenames"?
The latter.
> Are there any plans to create filesystems that behave differently?
isofs, fat, ntfs, cifs for example.
> If the latter: This is wrong for e.g. a vfat mount that uses a codepage,
> right? Should the default in that case not be "I don't know"?
Quite possibly. Note that it could also be what you're interpreting it as
because the codepage got overridden by a mount parameter rather than what's on
the disk (assuming the medium actually records this).
One thing I'm confused about is that fat has both a codepage and a charset and
I'm not sure of the difference.
David
Powered by blists - more mailing lists