From f32ef14b7e0390d427153634ede40cc7b15599a4 Mon Sep 17 00:00:00 2001
From: Jason Wright <jason@cvs.openbsd.org>
Date: Sun, 28 May 2006 00:04:25 +0000
Subject: unknown ioctl is ENOTTY not EINVAL

---
 sys/dev/pci/if_bce.c  | 4 ++--
 sys/dev/pci/if_bge.c  | 4 ++--
 sys/dev/pci/if_de.c   | 7 +++----
 sys/dev/pci/if_em.c   | 4 ++--
 sys/dev/pci/if_ixgb.c | 4 ++--
 sys/dev/pci/if_lge.c  | 4 ++--
 sys/dev/pci/if_nfe.c  | 4 ++--
 sys/dev/pci/if_nge.c  | 4 ++--
 sys/dev/pci/if_pcn.c  | 4 ++--
 sys/dev/pci/if_sf.c   | 4 ++--
 sys/dev/pci/if_sis.c  | 4 ++--
 sys/dev/pci/if_sk.c   | 4 ++--
 sys/dev/pci/if_ste.c  | 4 ++--
 sys/dev/pci/if_stge.c | 4 ++--
 sys/dev/pci/if_ti.c   | 4 ++--
 sys/dev/pci/if_tl.c   | 4 ++--
 sys/dev/pci/if_txp.c  | 4 ++--
 sys/dev/pci/if_vge.c  | 4 ++--
 sys/dev/pci/if_vic.c  | 4 ++--
 sys/dev/pci/if_vr.c   | 4 ++--
 sys/dev/pci/if_wb.c   | 4 ++--
 sys/dev/pci/if_xge.c  | 4 ++--
 22 files changed, 45 insertions(+), 46 deletions(-)

(limited to 'sys/dev')

diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c
index c0ece2f292a..8f95531874b 100644
--- a/sys/dev/pci/if_bce.c
+++ b/sys/dev/pci/if_bce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bce.c,v 1.12 2006/03/25 22:41:44 djm Exp $ */
+/* $OpenBSD: if_bce.c,v 1.13 2006/05/28 00:04:24 jason Exp $ */
 /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $	 */
 
 /*
@@ -522,7 +522,7 @@ bce_ioctl(ifp, cmd, data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->bce_mii.mii_media, cmd);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 32857ed571e..cc74ac3d280 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_bge.c,v 1.147 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_bge.c,v 1.148 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -3157,7 +3157,7 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		}
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index 3602ebe2d14..e59afbbfb57 100644
--- a/sys/dev/pci/if_de.c
+++ b/sys/dev/pci/if_de.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_de.c,v 1.90 2006/05/09 20:58:56 brad Exp $	*/
+/*	$OpenBSD: if_de.c,v 1.91 2006/05/28 00:04:24 jason Exp $	*/
 /*	$NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $	*/
 
 /*-
@@ -4282,11 +4282,10 @@ tulip_ifioctl(
 	    ifp->if_mtu = ifr->ifr_mtu;
 	break;
 
-    default: {
-	error = EINVAL;
+    default:
+	error = ENOTTY;
 	break;
     }
-    }
 
     splx(s);
     TULIP_PERFEND(ifioctl);
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 852314909e2..0906ff57fc1 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 ***************************************************************************/
 
-/* $OpenBSD: if_em.c,v 1.126 2006/05/27 10:03:15 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.127 2006/05/28 00:04:24 jason Exp $ */
 /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
 
 #include <dev/pci/if_em.h>
@@ -539,7 +539,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		break;
 	default:
 		IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%x)", (int)command);
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	splx(s);
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index a73f0c8bd40..dff664ecad2 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 ***************************************************************************/
 
-/* $OpenBSD: if_ixgb.c,v 1.17 2006/05/27 10:03:15 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.18 2006/05/28 00:04:24 jason Exp $ */
 
 #include <dev/pci/if_ixgb.h>
 
@@ -412,7 +412,7 @@ ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		break;
 	default:
 		IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%X)\n", (int)command);
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	splx(s);
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index ff6f2e836d9..f8d6f8aad55 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_lge.c,v 1.42 2006/05/27 20:42:51 brad Exp $	*/
+/*	$OpenBSD: if_lge.c,v 1.43 2006/05/28 00:04:24 jason Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -1442,7 +1442,7 @@ lge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index a3459435b8e..2a89b01762b 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_nfe.c,v 1.59 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_nfe.c,v 1.60 2006/05/28 00:04:24 jason Exp $	*/
 
 /*-
  * Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -530,7 +530,7 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	splx(s);
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index 91b21e76c95..bcb5094a51b 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_nge.c,v 1.53 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_nge.c,v 1.54 2006/05/28 00:04:24 jason Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -2130,7 +2130,7 @@ nge_ioctl(ifp, command, data)
 		}
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c
index 8f2e5763cb5..0daa053f659 100644
--- a/sys/dev/pci/if_pcn.c
+++ b/sys/dev/pci/if_pcn.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_pcn.c,v 1.12 2006/04/21 14:16:08 mickey Exp $	*/
+/*	$OpenBSD: if_pcn.c,v 1.13 2006/05/28 00:04:24 jason Exp $	*/
 /*	$NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $	*/
 
 /*
@@ -1136,7 +1136,7 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		break;
 
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	/* Try to get more packets going. */
diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c
index e7b87448301..aa35a67dbda 100644
--- a/sys/dev/pci/if_sf.c
+++ b/sys/dev/pci/if_sf.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_sf.c,v 1.36 2006/03/25 22:41:45 djm Exp $ */
+/*	$OpenBSD: if_sf.c,v 1.37 2006/05/28 00:04:24 jason Exp $ */
 /*
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
@@ -521,7 +521,7 @@ int sf_ioctl(ifp, command, data)
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 51f455db82b..c77296fe324 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_sis.c,v 1.70 2006/05/27 21:48:22 brad Exp $ */
+/*	$OpenBSD: if_sis.c,v 1.71 2006/05/28 00:04:24 jason Exp $ */
 /*
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
@@ -1951,7 +1951,7 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index ec4a935fe1b..eb5164b1932 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_sk.c,v 1.109 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_sk.c,v 1.110 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -988,7 +988,7 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c
index a511a06546a..5c81c7f8bbb 100644
--- a/sys/dev/pci/if_ste.c
+++ b/sys/dev/pci/if_ste.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_ste.c,v 1.36 2006/04/02 05:12:02 brad Exp $ */
+/*	$OpenBSD: if_ste.c,v 1.37 2006/05/28 00:04:24 jason Exp $ */
 /*
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
@@ -1362,7 +1362,7 @@ int ste_ioctl(ifp, command, data)
 		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index c40416d5f9c..2b33c5c10f0 100644
--- a/sys/dev/pci/if_stge.c
+++ b/sys/dev/pci/if_stge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_stge.c,v 1.23 2006/03/25 22:41:45 djm Exp $	*/
+/*	$OpenBSD: if_stge.c,v 1.24 2006/05/28 00:04:24 jason Exp $	*/
 /*	$NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $	*/
 
 /*-
@@ -935,7 +935,7 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		break;
 
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	/* Try to get more packets going. */
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index a1f46bb92dc..227c816e2d8 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_ti.c,v 1.81 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_ti.c,v 1.82 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -2519,7 +2519,7 @@ ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index 6aadabe336d..dce96682a92 100644
--- a/sys/dev/pci/if_tl.c
+++ b/sys/dev/pci/if_tl.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_tl.c,v 1.40 2006/03/25 22:41:45 djm Exp $	*/
+/*	$OpenBSD: if_tl.c,v 1.41 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -1850,7 +1850,7 @@ int tl_ioctl(ifp, command, data)
 			    &sc->sc_mii.mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index fdfecb2f184..02f921fb3c3 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_txp.c,v 1.81 2006/04/26 15:47:07 jason Exp $	*/
+/*	$OpenBSD: if_txp.c,v 1.82 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 2001
@@ -1302,7 +1302,7 @@ txp_ioctl(ifp, command, data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index bfb91a89370..2561b094f24 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_vge.c,v 1.22 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_vge.c,v 1.23 2006/05/28 00:04:24 jason Exp $	*/
 /*	$FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $	*/
 /*
  * Copyright (c) 2004
@@ -1797,7 +1797,7 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 6e0076f4cee..48b5a3ceb68 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_vic.c,v 1.6 2006/03/25 22:41:46 djm Exp $	*/
+/*	$OpenBSD: if_vic.c,v 1.7 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -687,7 +687,7 @@ vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		break;
 
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	if (error == ENETRESET) {
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 70973f8c283..a72d939147a 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_vr.c,v 1.62 2006/04/28 06:32:31 brad Exp $	*/
+/*	$OpenBSD: if_vr.c,v 1.63 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -1578,7 +1578,7 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index 6fcdd2a6ff3..3b07a48eaa3 100644
--- a/sys/dev/pci/if_wb.c
+++ b/sys/dev/pci/if_wb.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_wb.c,v 1.34 2006/03/25 22:41:46 djm Exp $	*/
+/*	$OpenBSD: if_wb.c,v 1.35 2006/05/28 00:04:24 jason Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -1669,7 +1669,7 @@ int wb_ioctl(ifp, command, data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 		break;
 	}
 
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index ce5d784782f..d6d6707d50b 100644
--- a/sys/dev/pci/if_xge.c
+++ b/sys/dev/pci/if_xge.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: if_xge.c,v 1.15 2006/05/27 10:03:15 brad Exp $	*/
+/*	$OpenBSD: if_xge.c,v 1.16 2006/05/28 00:04:24 jason Exp $	*/
 /*	$NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $	*/
 
 /*
@@ -917,7 +917,7 @@ xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		error = ifmedia_ioctl(ifp, ifr, &sc->xena_media, cmd);
 		break;
 	default:
-		error = EINVAL;
+		error = ENOTTY;
 	}
 
 	splx(s);
-- 
cgit v1.2.3