* [patch] fallocate.2: Reference header linux/falloc.h
@ 2012-12-16 15:08 Filipe David Manana
[not found] ` <CAL3q7H6SXux13tVdjaUwXOA4Zu7kTtFJcyOKAmyyYCZvjgFzWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Filipe David Manana @ 2012-12-16 15:08 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
This affects all versions of the man pages that include fallocate.2
(to my knowledge).
Attempting to compile a program that calls fallocate() and references
the modes FALLOC_FL_KEEP_SIZE or FALLOC_FL_PUNCH_HOLE fails, because
these constants are not defined in fcntl.h (the only header referenced
in the man page for fallocate.2).
Patch follows inline below, and as an attachment as well.
Thank you.
>From 50b3cac563f6646fc75ffb8658064b25529cadea Mon Sep 17 00:00:00 2001
From: Filipe David Borba Manana <fdmanana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Sun, 16 Dec 2012 14:56:47 +0000
Subject: [PATCH] fallocate.2: Reference header linux/falloc.h
This header file is where the constants used for the
mode parameter are defined (FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE at the moment).
---
man2/fallocate.2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 363e50f..4aea591 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -12,6 +12,7 @@ fallocate \- manipulate file space
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <fcntl.h>
+.B #include <linux/falloc.h>
.BI "int fallocate(int " fd ", int " mode ", off_t " offset \
", off_t " len ");
--
1.7.9.5
--
Filipe David Manana,
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."
[-- Attachment #2: 0001-fallocate.2-Reference-header-linux-falloc.h.patch --]
[-- Type: application/octet-stream, Size: 840 bytes --]
From 50b3cac563f6646fc75ffb8658064b25529cadea Mon Sep 17 00:00:00 2001
From: Filipe David Borba Manana <fdmanana@gmail.com>
Date: Sun, 16 Dec 2012 14:56:47 +0000
Subject: [PATCH] fallocate.2: Reference header linux/falloc.h
This header file is where the constants used for the
mode parameter are defined (FALLOC_FL_KEEP_SIZE and
FALLOC_FL_PUNCH_HOLE at the moment).
---
man2/fallocate.2 | 1 +
1 file changed, 1 insertion(+)
diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 363e50f..4aea591 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -12,6 +12,7 @@ fallocate \- manipulate file space
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <fcntl.h>
+.B #include <linux/falloc.h>
.BI "int fallocate(int " fd ", int " mode ", off_t " offset \
", off_t " len ");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] fallocate.2: Reference header linux/falloc.h
[not found] ` <CAL3q7H6SXux13tVdjaUwXOA4Zu7kTtFJcyOKAmyyYCZvjgFzWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-12-17 1:11 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-12-17 1:11 UTC (permalink / raw)
To: fdmanana-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
On Sun, Dec 16, 2012 at 4:08 PM, Filipe David Manana <fdmanana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> This affects all versions of the man pages that include fallocate.2
> (to my knowledge).
>
> Attempting to compile a program that calls fallocate() and references
> the modes FALLOC_FL_KEEP_SIZE or FALLOC_FL_PUNCH_HOLE fails, because
> these constants are not defined in fcntl.h (the only header referenced
> in the man page for fallocate.2).
>
> Patch follows inline below, and as an attachment as well.
> Thank you.
>
> From 50b3cac563f6646fc75ffb8658064b25529cadea Mon Sep 17 00:00:00 2001
> From: Filipe David Borba Manana <fdmanana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Sun, 16 Dec 2012 14:56:47 +0000
> Subject: [PATCH] fallocate.2: Reference header linux/falloc.h
>
> This header file is where the constants used for the
> mode parameter are defined (FALLOC_FL_KEEP_SIZE and
> FALLOC_FL_PUNCH_HOLE at the moment).
Hello Filipe,
Thanks for the report. I've not decided yet what to do with the man
page, because the real problem is with glibc, which should define
those constants in <bits/fcntl.h>. In the meantime, I have filed this:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=14964
Cheers,
Michael
> ---
> man2/fallocate.2 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/man2/fallocate.2 b/man2/fallocate.2
> index 363e50f..4aea591 100644
> --- a/man2/fallocate.2
> +++ b/man2/fallocate.2
> @@ -12,6 +12,7 @@ fallocate \- manipulate file space
> .nf
> .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
> .B #include <fcntl.h>
> +.B #include <linux/falloc.h>
>
> .BI "int fallocate(int " fd ", int " mode ", off_t " offset \
> ", off_t " len ");
> --
> 1.7.9.5
>
>
>
> --
> Filipe David Manana,
>
> "Reasonable men adapt themselves to the world.
> Unreasonable men adapt the world to themselves.
> That's why all progress depends on unreasonable men."
--
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-12-17 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 15:08 [patch] fallocate.2: Reference header linux/falloc.h Filipe David Manana
[not found] ` <CAL3q7H6SXux13tVdjaUwXOA4Zu7kTtFJcyOKAmyyYCZvjgFzWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-17 1:11 ` Michael Kerrisk (man-pages)
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).