kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: valdis.kletnieks@vt.edu
Cc: Kernel Newbies <kernelnewbies@kernelnewbies.org>
Subject: Re: why are some stat.h "S_*" perm macros not exported via uapi?
Date: Tue, 1 Jan 2019 04:41:30 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.21.1901010440130.19626@localhost.localdomain> (raw)
In-Reply-To: <9205.1546303487@turing-police.cc.vt.edu>

On Mon, 31 Dec 2018, valdis.kletnieks@vt.edu 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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2019-01-01  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31 19:53 why are some stat.h "S_*" perm macros not exported via uapi? Robert P. J. Day
2019-01-01  0:44 ` valdis.kletnieks
2019-01-01  9:41   ` Robert P. J. Day [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.1901010440130.19626@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=valdis.kletnieks@vt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).