lkml.org 
[lkml]   [2018]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 34/38] vfs: syscall: Add fsinfo() to query filesystem information [ver #10]
Date
Jann Horn <jannh@google.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

\
 
 \ /
  Last update: 2018-07-28 01:51    [W:0.740 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site