* [PATCH 1/1] fcntl: F_GETFL: return value contains additional internal flags
@ 2014-04-24 20:05 Heinrich Schuchardt
[not found] ` <1398369940-13673-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2014-04-24 20:05 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Heinrich Schuchardt
flags = fcntl(fd, F_GETFL);
can return more flags than those defined in the open(2) manpage, e.g.
#define FMODE_NONOTIFY 0x1000000
The manpage should point this out.
Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
---
man2/fcntl.2 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/man2/fcntl.2 b/man2/fcntl.2
index fc1d3b3..0fd2d0a 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -180,6 +180,9 @@ The file status flags and their semantics are described in
Get the file access mode and the file status flags;
.I arg
is ignored.
+The return value contains the file status flags as described in
+.IR open (2).
+It may additionally contain status flags that are only used internally.
.TP
.BR F_SETFL " (\fIint\fP)"
Set the file status flags to the value specified by
--
1.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] fcntl: F_GETFL: return value contains additional internal flags
[not found] ` <1398369940-13673-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
@ 2014-04-25 13:46 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgi3XZY4v8JBPZjP=5sOmKpQPEMbaFJ8OSRnMW-+PyxLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-04-25 13:46 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: linux-man
Hi Heinrich,
On Thu, Apr 24, 2014 at 10:05 PM, Heinrich Schuchardt
<xypron.glpk-Mmb7MZpHnFY@public.gmane.org> wrote:
> flags = fcntl(fd, F_GETFL);
>
> can return more flags than those defined in the open(2) manpage, e.g.
> #define FMODE_NONOTIFY 0x1000000
>
> The manpage should point this out.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
I think it might be good to mention a concrete example here. So, how
about explicitly mentioning the FMODE_NONOTIFY and the fanotify(7) man
page. Could you redraft?
Thanks,
Michael
> ---
> man2/fcntl.2 | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/man2/fcntl.2 b/man2/fcntl.2
> index fc1d3b3..0fd2d0a 100644
> --- a/man2/fcntl.2
> +++ b/man2/fcntl.2
> @@ -180,6 +180,9 @@ The file status flags and their semantics are described in
> Get the file access mode and the file status flags;
> .I arg
> is ignored.
> +The return value contains the file status flags as described in
> +.IR open (2).
> +It may additionally contain status flags that are only used internally.
> .TP
> .BR F_SETFL " (\fIint\fP)"
> Set the file status flags to the value specified by
> --
> 1.9.2
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] fcntl: F_GETFL: return value contains additional internal flags
[not found] ` <CAKgNAkgi3XZY4v8JBPZjP=5sOmKpQPEMbaFJ8OSRnMW-+PyxLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-25 15:30 ` Heinrich Schuchardt
0 siblings, 0 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2014-04-25 15:30 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man
On 25.04.2014 15:46, Michael Kerrisk (man-pages) wrote:
> Hi Heinrich,
>
> On Thu, Apr 24, 2014 at 10:05 PM, Heinrich Schuchardt
> <xypron.glpk-Mmb7MZpHnFY@public.gmane.org> wrote:
>> flags = fcntl(fd, F_GETFL);
>>
>> can return more flags than those defined in the open(2) manpage, e.g.
>> #define FMODE_NONOTIFY 0x1000000
>>
>> The manpage should point this out.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
>
> I think it might be good to mention a concrete example here. So, how
> about explicitly mentioning the FMODE_NONOTIFY and the fanotify(7) man
> page. Could you redraft?
Please, read my mail
Re: fanotify API: FMODE_NONOTIFY, FMODE_EXEC, FMODE_NOCMTIME
13.04.2014 16:05 (CEST)
http://www.spinics.net/lists/linux-man/msg05366.html
I mentioned that some other flags can be returned by fcntl, too. These
are not specific to fanotify. The examples given were
0x20 (FMODE_EXEC), and
0x800 (FMODE_NOCMTIME)
All relevant flags are defined in
include/uapi/asm-generic/fcntl.h
So would it not make more sense to relate to this include instead of
fanotify(7)?
I never got a reply to the question asked in aforementioned mail,
whether the observed behavior should be mentioned in the BUGS section of
fanotify(7).
Cheers
Heinrich
> Thanks,
>
> Michael
>
>
>> ---
>> man2/fcntl.2 | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/man2/fcntl.2 b/man2/fcntl.2
>> index fc1d3b3..0fd2d0a 100644
>> --- a/man2/fcntl.2
>> +++ b/man2/fcntl.2
>> @@ -180,6 +180,9 @@ The file status flags and their semantics are described in
>> Get the file access mode and the file status flags;
>> .I arg
>> is ignored.
>> +The return value contains the file status flags as described in
>> +.IR open (2).
>> +It may additionally contain status flags that are only used internally.
>> .TP
>> .BR F_SETFL " (\fIint\fP)"
>> Set the file status flags to the value specified by
>> --
>> 1.9.2
>>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-25 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-24 20:05 [PATCH 1/1] fcntl: F_GETFL: return value contains additional internal flags Heinrich Schuchardt
[not found] ` <1398369940-13673-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-04-25 13:46 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgi3XZY4v8JBPZjP=5sOmKpQPEMbaFJ8OSRnMW-+PyxLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-25 15:30 ` Heinrich Schuchardt
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).