linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Cc: "Handle X" <xhandle@gmail.com>,
	"Björn Steinbrink" <B.Steinbrink@gmx.de>,
	"Alexey Dobriyan" <adobriyan@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] #define rwxr_xr_x 0755
Date: Fri, 28 Jul 2006 21:43:57 -0400	[thread overview]
Message-ID: <200607282143.58915.dtor@insightbb.com> (raw)
In-Reply-To: <20060728164839.GA20974@filer.fsl.cs.sunysb.edu>

On Friday 28 July 2006 12:48, Josef Sipek wrote:
> On Fri, Jul 28, 2006 at 09:34:11AM -0700, Handle X wrote:
> > On 7/27/06, Björn Steinbrink <B.Steinbrink@gmx.de> wrote:
> > >On 2006.07.28 00:59:11 +0400, Alexey Dobriyan wrote:
> > >> 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.
> > >
> > >IMHO #3 sucks more, it's not as easy to spot when glossing over the
> > >code, the underscores make it quite ugly (think _r________) and it's
> > >less "greppable". If I know that there's something that sets S_ISUID, I
> > >can easily search for that, compare that to [_cpdbl]{1}[r_]{1}[w_]{1}s...
> > I agree with Steinbink. But how about having macros like,
> > S_I0700, S_I0070, S_I6444 ..etc. They combine visual appeal of octals,
> > easy to grep, easy to decipher ...etc.
> 
> Even better!
> 

So now tell me how is S_I0644 better than 0644? S_IRUGO et al at least hide
implementation details.

-- 
Dmitry

  reply	other threads:[~2006-07-29  1:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27 20:59 [RFC] #define rwxr_xr_x 0755 Alexey Dobriyan
2006-07-27 22:23 ` Björn Steinbrink
2006-07-28 16:34   ` Handle X
2006-07-28 16:48     ` Josef Sipek
2006-07-29  1:43       ` Dmitry Torokhov [this message]
2006-07-29  7:59         ` Jan Engelhardt
2006-07-28  3:22 ` Josef Sipek
2006-07-29 13:58 ` Johannes Weiner
2006-07-28  4:54 Albert Cahalan

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=200607282143.58915.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=B.Steinbrink@gmx.de \
    --cc=adobriyan@gmail.com \
    --cc=jsipek@fsl.cs.sunysb.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xhandle@gmail.com \
    /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).