[patch] fallocate.2: Reference header linux/falloc.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
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: 0001-fallocate.2-Reference-header-linux-falloc.h.patch
Description: Binary data


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux