Bug 153601 - ioctl(2) man page has wrong prototype
Summary: ioctl(2) man page has wrong prototype
Status: VERIFIED WORKSFORME
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: unspecified
Hardware: All SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: ---
Assignee: Thorsten Kukuk
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-27 00:25 UTC by Lawrence D'Oliveiro
Modified: 2006-03-28 05:03 UTC (History)
0 users

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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