summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-03-24 17:51:15 +0000
committerbrooks <brooks@FreeBSD.org>2005-03-24 17:51:15 +0000
commitb25337dcb44758ef450a424b013dae1a27de588d (patch)
tree485a1633994f9fe080beeb209cc8f55afcfe8534 /sys
parent80a56fb6075e07fcd9747f1b64396ff18c149fae (diff)
downloadFreeBSD-src-b25337dcb44758ef450a424b013dae1a27de588d.zip
FreeBSD-src-b25337dcb44758ef450a424b013dae1a27de588d.tar.gz
Compile errors are way more useful then panics later.
Replace a KASSERT of LINUX_IFNAMSIZ == IFNAMSIZ with a preprocessor check and #error message. This will prevent nasty suprises if users change IFNAMSIZ without updating the linux code appropriatly.
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_ioctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 20a2aa9..89ba36a 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -70,6 +70,10 @@ __FBSDID("$FreeBSD$");
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_util.h>
+#if (LINUX_IFNAMSIZ != IFNAMSIZ)
+#error "LINUX_IFNAMSIZ != IFNAMSIZ"
+#endif
+
static linux_ioctl_function_t linux_ioctl_cdrom;
static linux_ioctl_function_t linux_ioctl_vfat;
static linux_ioctl_function_t linux_ioctl_console;
@@ -2235,9 +2239,6 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
struct file *fp;
int error, type;
- KASSERT(LINUX_IFNAMSIZ == IFNAMSIZ,
- ("%s(): LINUX_IFNAMSIZ != IFNAMSIZ", __func__));
-
ifp = NULL;
error = 0;
OpenPOWER on IntegriCloud