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

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

Commit Message

Vitaly Buka via Libc-alpha April 4, 2021, 11:58 a.m.
<linux/fs.h> doesn't seem to be needed!
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_getfsmap.2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.31.0

Comments

Vitaly Buka via Libc-alpha April 5, 2021, 11:10 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> <linux/fs.h> doesn't seem to be needed!

> 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>


Patch applied. Again, I did of editing afterward.

Thanks,

Michael


> ---

>  man2/ioctl_getfsmap.2 | 5 +++--

>  1 file changed, 3 insertions(+), 2 deletions(-)

> 

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

> index 4ff1c8a90..f87fb5c7a 100644

> --- a/man2/ioctl_getfsmap.2

> +++ b/man2/ioctl_getfsmap.2

> @@ -25,9 +25,10 @@

>  ioctl_getfsmap \- retrieve the physical layout of the filesystem

>  .SH SYNOPSIS

>  .nf

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

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

> +.RB " /* Definition of " FS_IOC_GETFSMAP ", " FM?_OF_* ", and " *FMR_OWN_* \

> +" constants */"

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

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

>  .PP

>  .BI "int ioctl(int " fd ", FS_IOC_GETFSMAP, struct fsmap_head * " 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_getfsmap.2 b/man2/ioctl_getfsmap.2
index 4ff1c8a90..f87fb5c7a 100644
--- a/man2/ioctl_getfsmap.2
+++ b/man2/ioctl_getfsmap.2
@@ -25,9 +25,10 @@ 
 ioctl_getfsmap \- retrieve the physical layout of the filesystem
 .SH SYNOPSIS
 .nf
-.B #include <sys/ioctl.h>
-.B #include <linux/fs.h>
+.RB " /* Definition of " FS_IOC_GETFSMAP ", " FM?_OF_* ", and " *FMR_OWN_* \
+" constants */"
 .B #include <linux/fsmap.h>
+.B #include <sys/ioctl.h>
 .PP
 .BI "int ioctl(int " fd ", FS_IOC_GETFSMAP, struct fsmap_head * " arg );
 .fi