Re: [RFC] #define rwxr_xr_x 0755

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

 



Alexey Dobriyan writes:

Every time I try to decipher S_I* combos I cry in pain. Often I just
refer to include/linux/stat.h defines to find out what mode it is
because numbers are actually quickier to understand.

Compare and contrast:

      0644 vs S_IRUGO|S_IWUSR vs rw_r__r__
I'd say #2 really sucks.

Damn right.

I'd be very happy to remove (or #ifndef __KERNEL__ as needed) the
dreadful S_FOO macros. I'd be much happier with plain old octal,
as is normally used for both syscalls and the chmod command.

(the non-octal nonsense was probably invented for porting
software to non-UNIX systems)

If you like the ls way though, you might as well add the file
type notation:  drwxr_xr_x, _r__r__r__, _rw_r__r__, etc.
That's not too bad. Plain octal is best though.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux