[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201121173054.12172-1-alx.manpages@gmail.com>
Date: Sat, 21 Nov 2020 18:30:56 +0100
From: Alejandro Colomar <alx.manpages@...il.com>
To: mtk.manpages@...il.com
Cc: Alejandro Colomar <alx.manpages@...il.com>,
linux-man@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] lseek.2: SYNOPSIS: Use correct types
The Linux kernel uses 'unsigned int' instead of 'int'
for 'fd' and 'whence'.
As glibc provides no wrapper, use the same types the kernel uses.
src/linux$ grep -rn "SYSCALL_DEFINE.*lseek"
fs/read_write.c:322:SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence)
fs/read_write.c:328:COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned int, whence)
fs/read_write.c:336:SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
arch/mips/kernel/linux32.c:65:SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high,
src/linux$ sed -n 322,325p fs/read_write.c
SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence)
{
return ksys_lseek(fd, offset, whence);
}
Signed-off-by: Alejandro Colomar <alx.manpages@...il.com>
---
man2/lseek.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/lseek.2 b/man2/lseek.2
index e35e410a6..2ff878ffa 100644
--- a/man2/lseek.2
+++ b/man2/lseek.2
@@ -51,7 +51,7 @@ lseek \- reposition read/write file offset
.br
.B #include <unistd.h>
.PP
-.BI "off_t lseek(int " fd ", off_t " offset ", int " whence );
+.BI "off_t lseek(unsigned int " fd ", off_t " offset ", unsigned int " whence );
.SH DESCRIPTION
.BR lseek ()
repositions the file offset of the open file description
--
2.29.2
Powered by blists - more mailing lists