* syncfs returns int (or long?)
@ 2012-02-11 15:49 Simone Piccardi
[not found] ` <4F368DF3.10605-TuvemuYfxVQ1GQ1Ptb7lUw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Simone Piccardi @ 2012-02-11 15:49 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
In man 2 syncfs (version 2011-09-07, also in the website) it is declared as:
void syncfs(int fd);
but then is said:
RETURN VALUE
syncfs() returns 0 on success; on error, it returns -1 and
sets errno to indicate the error.
so it cannot be void. I get
piccardi@monk:/usr/src/linux-source-3.1$ grep -r syncfs include/*
include/asm-generic/unistd.h:#define __NR_syncfs 267
include/asm-generic/unistd.h:__SYSCALL(__NR_syncfs, sys_syncfs)
include/linux/syscalls.h:asmlinkage long sys_syncfs(int fd);
So it seems to be at least long.
Simone
--
Simone Piccardi - KeyID:2A972F9D - JabberID:piccardi-TuvemuYfxVQ1GQ1Ptb7lUw@public.gmane.org
http://piccardi.gnulinux.it - http://www.fountainpen.it
Prima ti ignorano, poi ti deridono, poi ti combattono. Poi vinci.
M. K. Ghandi
--
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] 2+ messages in thread
* Re: syncfs returns int (or long?)
[not found] ` <4F368DF3.10605-TuvemuYfxVQ1GQ1Ptb7lUw@public.gmane.org>
@ 2012-02-18 1:36 ` Michael Kerrisk
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk @ 2012-02-18 1:36 UTC (permalink / raw)
To: Simone Piccardi; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hello SImone,
On Sun, Feb 12, 2012 at 4:49 AM, Simone Piccardi <piccardi-TuvemuYfxVQ1GQ1Ptb7lUw@public.gmane.org> wrote:
> In man 2 syncfs (version 2011-09-07, also in the website) it is declared as:
>
> void syncfs(int fd);
>
> but then is said:
>
> RETURN VALUE
> syncfs() returns 0 on success; on error, it returns -1 and
> sets errno to indicate the error.
>
> so it cannot be void. I get
>
> piccardi@monk:/usr/src/linux-source-3.1$ grep -r syncfs include/*
> include/asm-generic/unistd.h:#define __NR_syncfs 267
> include/asm-generic/unistd.h:__SYSCALL(__NR_syncfs, sys_syncfs)
> include/linux/syscalls.h:asmlinkage long sys_syncfs(int fd);
>
> So it seems to be at least long.
Thanks for the report! In glibc, the prototype is "int", so for
man-pages-3.36 I've changed it to "int".
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
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] 2+ messages in thread
end of thread, other threads:[~2012-02-18 1:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-11 15:49 syncfs returns int (or long?) Simone Piccardi
[not found] ` <4F368DF3.10605-TuvemuYfxVQ1GQ1Ptb7lUw@public.gmane.org>
2012-02-18 1:36 ` Michael Kerrisk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox