summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2019-01-31 12:31:50 +0000
committerchristos <christos@NetBSD.org>2019-01-31 12:31:50 +0000
commit2f8b9a90345752d9f5fadb7786b5fbf24d1a1373 (patch)
tree09ff8e93ea37d6710a043baa884d074e8b922793 /sys/dev/raidframe
parent4bb9dcee27386fd145f591e7226174d9fcd98137 (diff)
Prevent integer overflow: ioctl commands are u_long.
For consistency move prototype to the _mod.h header. XXX: Why are the compat files here? Shouldn't they be in compat/common? Or because this could be a separate module, they belong with it?
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_compat50.c4
-rw-r--r--sys/dev/raidframe/rf_compat50.h4
-rw-r--r--sys/dev/raidframe/rf_compat50_mod.h4
-rw-r--r--sys/dev/raidframe/rf_compat80.c4
-rw-r--r--sys/dev/raidframe/rf_compat80_mod.h4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/raidframe/rf_compat50.c b/sys/dev/raidframe/rf_compat50.c
index 71401cfbb35..dc38fc496f5 100644
--- a/sys/dev/raidframe/rf_compat50.c
+++ b/sys/dev/raidframe/rf_compat50.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat50.c,v 1.5 2019/01/29 09:28:50 pgoyette Exp $ */
+/* $NetBSD: rf_compat50.c,v 1.6 2019/01/31 12:31:50 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -220,7 +220,7 @@ out:
}
int
-raidframe_ioctl_50(int cmd, int initted, RF_Raid_t *raidPtr, int unit,
+raidframe_ioctl_50(u_long cmd, int initted, RF_Raid_t *raidPtr, int unit,
void *data, RF_Config_t **k_cfg)
{
int error;
diff --git a/sys/dev/raidframe/rf_compat50.h b/sys/dev/raidframe/rf_compat50.h
index 69d3aa82593..98fe4169de7 100644
--- a/sys/dev/raidframe/rf_compat50.h
+++ b/sys/dev/raidframe/rf_compat50.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat50.h,v 1.3 2019/01/27 02:08:42 pgoyette Exp $ */
+/* $NetBSD: rf_compat50.h,v 1.4 2019/01/31 12:31:50 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -47,6 +47,4 @@
int rf_config50(RF_Raid_t *, int, void *, RF_Config_t **);
int rf_get_info50(RF_Raid_t *, void *);
-int raidframe_ioctl_50(int, int, RF_Raid_t *, int, void *, RF_Config_t **);
-
#endif /* _RF_COMPAT50_H_ */
diff --git a/sys/dev/raidframe/rf_compat50_mod.h b/sys/dev/raidframe/rf_compat50_mod.h
index a9447d00beb..090cf224c3b 100644
--- a/sys/dev/raidframe/rf_compat50_mod.h
+++ b/sys/dev/raidframe/rf_compat50_mod.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat50_mod.h,v 1.2 2019/01/27 02:08:42 pgoyette Exp $ */
+/* $NetBSD: rf_compat50_mod.h,v 1.3 2019/01/31 12:31:50 christos Exp $ */
/*-
@@ -36,4 +36,6 @@
void raidframe_50_fini(void);
void raidframe_50_init(void);
+int raidframe_ioctl_50(u_long, int, RF_Raid_t *, int, void *, RF_Config_t **);
+
#endif /* _RF_COMPAT50_MOD_H_ */
diff --git a/sys/dev/raidframe/rf_compat80.c b/sys/dev/raidframe/rf_compat80.c
index f3927bac5f9..b7fad134f94 100644
--- a/sys/dev/raidframe/rf_compat80.c
+++ b/sys/dev/raidframe/rf_compat80.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat80.c,v 1.6 2019/01/29 23:57:01 pgoyette Exp $ */
+/* $NetBSD: rf_compat80.c,v 1.7 2019/01/31 12:31:50 christos Exp $ */
/*
* Copyright (c) 2017 Matthew R. Green
@@ -223,7 +223,7 @@ rf_config80(RF_Raid_t *raidPtr, int unit, void *data, RF_Config_t **k_cfgp)
}
int
-raidframe_ioctl_80(int cmd, int initted, RF_Raid_t *raidPtr, int unit,
+raidframe_ioctl_80(u_long cmd, int initted, RF_Raid_t *raidPtr, int unit,
void *data, RF_Config_t **k_cfg)
{
int error;
diff --git a/sys/dev/raidframe/rf_compat80_mod.h b/sys/dev/raidframe/rf_compat80_mod.h
index 9f0a627e5d8..853fbf5b383 100644
--- a/sys/dev/raidframe/rf_compat80_mod.h
+++ b/sys/dev/raidframe/rf_compat80_mod.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_compat80_mod.h,v 1.2 2019/01/27 02:08:42 pgoyette Exp $ */
+/* $NetBSD: rf_compat80_mod.h,v 1.3 2019/01/31 12:31:50 christos Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
struct RF_Raid_s;
struct RF_Config_s;
-int raidframe_ioctl_80(int, int, struct RF_Raid_s *, int, void *,
+int raidframe_ioctl_80(u_long, int, struct RF_Raid_s *, int, void *,
struct RF_Config_s **);
void raidframe_80_init(void);