Re: Using bit shifts for VXFS file modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 1, 2021 at 5:48 PM Darrick J. Wong <djwong@xxxxxxxxxx> wrote:
>
> On Mon, Feb 01, 2021 at 03:49:20PM -0800, Amy Parker wrote:
> > Hello filesystem developers!
> >
> > I was scouting through the FreeVXFS code, when I came across this in
> > fs/freevxfs/vxfs.h:
> >
> > enum vxfs_mode {
> >         VXFS_ISUID = 0x00000800, /* setuid */
> >         VXFS_ISGID = 0x00000400, /* setgid */
> >         VXFS_ISVTX = 0x00000200, /* sticky bit */
> >         VXFS_IREAD = 0x00000100, /* read */
> >         VXFS_IWRITE = 0x00000080, /* write */
> >         VXFS_IEXEC = 0x00000040, /* exec */
> >
> > Especially in an expanded form like this, these are ugly to read, and
> > a pain to work with.
>
> I would personally just change those to use the constants in
> include/uapi/linux/stat.h.  They're userspace ABI and I don't think
> anyone's going to come up with a good reason to change the numbering
> after nearly 50 years.

This is a great idea. Didn't think of that, thank you.

>
> That said, on the general principle of "anything you touch you get to
> QA" I would leave it alone.
>

Yeah, I guess that's there too.

Best regards,
Amy Parker
(she/her/hers)



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux