From: Joe Perches <joe@perches.com>
To: Aditya <yashsri421@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org, dwaipayanray1@gmail.com
Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: fix false positive for REPEATED_WORD warning
Date: Wed, 21 Oct 2020 13:36:57 -0700 [thread overview]
Message-ID: <05ace32973590e28f62ccddfd7874cf1fcaca8b1.camel@perches.com> (raw)
In-Reply-To: <5bacf91085ce7e253b2697333dc8ff0378fcfae9.camel@perches.com>
On Wed, 2020-10-21 at 12:26 -0700, Joe Perches wrote:
> Perhaps a regex for permissions is good enough
> $line !~ /\b[cbdl-][rwxs-]{9,9}\b/
Maybe not completely correct...
From info ls:
The file type is one of the following characters:
‘-’
regular file
‘b’
block special file
‘c’
character special file
‘C’
high performance (“contiguous data”) file
‘d’
directory
‘D’
door (Solaris 2.5 and up)
‘l’
symbolic link
‘M’
off-line (“migrated”) file (Cray DMF)
‘n’
network special file (HP-UX)
‘p’
FIFO (named pipe)
‘P’
port (Solaris 10 and up)
‘s’
socket
‘?’
some other file type
The file mode bits listed are similar to symbolic mode
specifications (*note Symbolic Modes::). But ‘ls’ combines
multiple bits into the third character of each set of permissions
as follows:
‘s’
If the set-user-ID or set-group-ID bit and the corresponding
executable bit are both set.
‘S’
If the set-user-ID or set-group-ID bit is set but the
corresponding executable bit is not set.
‘t’
If the restricted deletion flag or sticky bit, and the
other-executable bit, are both set. The restricted deletion
flag is another name for the sticky bit. *Note Mode
Structure::.
‘T’
If the restricted deletion flag or sticky bit is set but the
other-executable bit is not set.
‘x’
If the executable bit is set and none of the above apply.
‘-’
Otherwise.
So apparently to be correct this should be:
$line !~ /\b[bcCdDlMnpPs\?-][rwxsStT-]{9,9}\b/
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-10-21 20:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 15:01 [Linux-kernel-mentees] [PATCH] checkpatch: fix false positive for REPEATED_WORD warning Aditya Srivastava
2020-10-21 15:08 ` Lukas Bulwahn
2020-10-21 15:18 ` Joe Perches
2020-10-21 15:28 ` Joe Perches
2020-10-21 16:50 ` Joe Perches
2020-10-21 16:59 ` Dwaipayan Ray
2020-10-21 17:17 ` Joe Perches
2020-10-21 17:55 ` Aditya
2020-10-21 18:05 ` Joe Perches
2020-10-21 18:25 ` Aditya
2020-10-21 19:12 ` Lukas Bulwahn
2020-10-22 14:21 ` Aditya
2020-10-22 14:35 ` Joe Perches
2020-10-21 19:10 ` Aditya
2020-10-21 19:26 ` Joe Perches
2020-10-21 20:36 ` Joe Perches [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-21 14:44 Aditya Srivastava
2020-10-21 14:50 ` Lukas Bulwahn
2020-10-21 5:00 Aditya Srivastava
2020-10-21 5:15 ` Aditya
2020-10-21 6:12 ` Lukas Bulwahn
2020-10-21 8:20 ` Dwaipayan Ray
2020-10-21 8:35 ` Aditya
2020-10-21 8:52 ` Lukas Bulwahn
2020-10-21 12:09 ` Aditya
2020-10-21 12:53 ` Aditya
2020-10-21 12:58 ` Lukas Bulwahn
2020-10-21 12:59 ` Dwaipayan Ray
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=05ace32973590e28f62ccddfd7874cf1fcaca8b1.camel@perches.com \
--to=joe@perches.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yashsri421@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).