[v5,32/35] ioctl_fideduperange.2: Make clear why exactly is each header needed

Message ID 20210404115847.78166-33-alx.manpages@gmail.com
State New
Headers show
Series
  • Untitled series #36415
Related show

Commit Message

Florian Weimer via Libc-alpha April 4, 2021, 11:58 a.m.
Only the include that provides the prototype doesn't need a comment.

Also sort the includes alphabetically.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/ioctl_fideduperange.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.31.0

Comments

Florian Weimer via Libc-alpha April 5, 2021, 11:16 a.m. | #1
Hi ALex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> Only the include that provides the prototype doesn't need a comment.

> 

> Also sort the includes alphabetically.


Patch applied. Again, some minor edits afterward.

Thanks,

Michael


> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

> ---

>  man2/ioctl_fideduperange.2 | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/man2/ioctl_fideduperange.2 b/man2/ioctl_fideduperange.2

> index 1df0628d0..82c7fdc28 100644

> --- a/man2/ioctl_fideduperange.2

> +++ b/man2/ioctl_fideduperange.2

> @@ -25,8 +25,9 @@

>  ioctl_fideduperange \- share some the data of one file with another file

>  .SH SYNOPSIS

>  .nf

> -.B #include <sys/ioctl.h>

> +.RB "         /* Definition of " FIDEDUPERANGE " and " FILE_DEDUPE_* " constants */"

>  .B #include <linux/fs.h>

> +.B #include <sys/ioctl.h>

>  .PP

>  .BI "int ioctl(int " src_fd ", FIDEDUPERANGE, struct file_dedupe_range *" arg );

>  .fi

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man2/ioctl_fideduperange.2 b/man2/ioctl_fideduperange.2
index 1df0628d0..82c7fdc28 100644
--- a/man2/ioctl_fideduperange.2
+++ b/man2/ioctl_fideduperange.2
@@ -25,8 +25,9 @@ 
 ioctl_fideduperange \- share some the data of one file with another file
 .SH SYNOPSIS
 .nf
-.B #include <sys/ioctl.h>
+.RB "         /* Definition of " FIDEDUPERANGE " and " FILE_DEDUPE_* " constants */"
 .B #include <linux/fs.h>
+.B #include <sys/ioctl.h>
 .PP
 .BI "int ioctl(int " src_fd ", FIDEDUPERANGE, struct file_dedupe_range *" arg );
 .fi