NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/38978: fsetown() and fgetown() have wrong prototypes for IO commands
>Number: 38978
>Category: kern
>Synopsis: fsetown() and fgetown() have wrong prototypes for IO commands
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 18 04:50:00 +0000 2008
>Originator: Gregory McGarry
>Release: -current
>Organization:
>Environment:
>Description:
fsetown() and fgetown() have prototypes taking an IO command of type int, while
as used elsewhere according to ioccomm.h, they are of type unsigned long.
Additionally, pmdevbyname().
>How-To-Repeat:
>Fix:
Index: kern/kern_descrip.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_descrip.c,v
retrieving revision 1.179
diff -u -r1.179 kern_descrip.c
--- kern/kern_descrip.c 5 May 2008 17:11:17 -0000 1.179
+++ kern/kern_descrip.c 18 Jun 2008 04:44:48 -0000
@@ -1732,7 +1732,7 @@
* 'pgid' is set to -pg_id.
*/
int
-fsetown(pid_t *pgid, int cmd, const void *data)
+fsetown(pid_t *pgid, u_long cmd, const void *data)
{
int id = *(const int *)data;
int error;
@@ -1762,7 +1762,7 @@
* needs the sign removed before use.
*/
int
-fgetown(pid_t pgid, int cmd, void *data)
+fgetown(pid_t pgid, u_long cmd, void *data)
{
switch (cmd) {
Index: kern/kern_drvctl.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_drvctl.c,v
retrieving revision 1.18
diff -u -r1.18 kern_drvctl.c
--- kern/kern_drvctl.c 30 May 2008 15:30:37 -0000 1.18
+++ kern/kern_drvctl.c 18 Jun 2008 04:44:48 -0000
@@ -161,7 +161,7 @@
}
static int
-pmdevbyname(int cmd, struct devpmargs *a)
+pmdevbyname(u_long cmd, struct devpmargs *a)
{
struct device *d;
Index: sys/file.h
===================================================================
RCS file: /cvsroot/src/sys/sys/file.h,v
retrieving revision 1.64
diff -u -r1.64 file.h
--- sys/file.h 21 Mar 2008 21:53:35 -0000 1.64
+++ sys/file.h 18 Jun 2008 04:44:49 -0000
@@ -115,8 +115,8 @@
int do_filewritev(int, const struct iovec *, int, off_t *,
int, register_t *);
-int fsetown(pid_t *, int, const void *);
-int fgetown(pid_t, int, void *);
+int fsetown(pid_t *, u_long, const void *);
+int fgetown(pid_t, u_long, void *);
void fownsignal(pid_t, int, int, int, void *);
/* Commonly used fileops */
Home |
Main Index |
Thread Index |
Old Index