Re: why are some stat.h "S_*" perm macros not exported via uapi?

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

 



On Mon, 31 Dec 2018, valdis.kletnieks@xxxxxx wrote:

> On Mon, 31 Dec 2018 14:53:30 -0500, "Robert P. J. Day" said:
>
> >   #define S_IRWXUGO       (S_IRWXU|S_IRWXG|S_IRWXO)
> >   #define S_IALLUGO       (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
> >   #define S_IRUGO         (S_IRUSR|S_IRGRP|S_IROTH)
> >   #define S_IWUGO         (S_IWUSR|S_IWGRP|S_IWOTH)
> >   #define S_IXUGO         (S_IXUSR|S_IXGRP|S_IXOTH)
>
> Can you give an actual non-contrived example of code where one of
> these would be preferable to inline coding the mask? And do you plan
> to include all the various combos? And why should that be done in
> the uapi headers, rather than glibc/musl/other_c_lib providing it?

... snip ...

  i am not *defending* the above macros, simply pointing out that,
unlike all the other simpler macros that *are* exported via uapi,
these are left all by their lonesome in kernel space. i'm just
wondering if there's a reason for that.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux