Bug 153601

Summary: ioctl(2) man page has wrong prototype
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Lawrence D'Oliveiro <from-novell>
Component: BasesystemAssignee: Thorsten Kukuk <kukuk>
Status: VERIFIED WORKSFORME QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lawrence D'Oliveiro 2006-02-27 00:25:42 UTC
The man page for ioctl(2) lists the type of the second and subsequent arguments as "int". This is wrong. The include file /usr/include/sys/ioctl.h gives the type as "unsigned long int". The difference matters on 64-bit machines, where long is the same size as an address, but int is not.
Comment 1 Thorsten Kukuk 2006-03-23 10:43:35 UTC
Which is no real problem if you don't ignore the compiler warnings.
The type isn't fixed, it is depending on what you wish to change/get from the kernel.
Comment 2 Lawrence D'Oliveiro 2006-03-28 02:52:39 UTC
This is a documentation bug. It needs to be fixed by someone who understands what "documentation" means.

Thank you.
Comment 3 Thorsten Kukuk 2006-03-28 04:44:37 UTC
Then find one and list all variants in the upstream version and we will pull it the next time.
Comment 4 Lawrence D'Oliveiro 2006-03-28 05:03:44 UTC
--- ioctl.2     2004-11-04 02:51:07.000000000 +1300
+++ ioctl.2-patch       2006-03-28 17:02:01.000000000 +1200
@@ -42,7 +42,7 @@
 .SH SYNOPSIS
 .B #include <sys/ioctl.h>
 .sp
-.BI "int ioctl(int " d ", int " request ", ...);"
+.BI "int ioctl(int " d ", unsigned long int " request ", ...);"
 .SH DESCRIPTION
 The
 .B ioctl