From dee554182a37d9dc05bb8dfb2fff48b78a6900bf Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Wed, 30 May 2018 07:52:35 +0200
Subject: [PATCH] Comment out or remove almost all unimplemented ioctls.

---
 Makefile_upgrade.inc                 |   1 +
 libexec/rbootd/bpf.c                 |   8 --
 share/examples/meteor/README         |   1 -
 share/examples/meteor/rgb16.c        | 106 -----------------
 share/examples/meteor/rgb24.c        | 101 ----------------
 share/examples/meteor/test-n.c       | 162 --------------------------
 share/examples/meteor/yuvpk.c        | 118 -------------------
 share/examples/meteor/yuvpl.c        | 138 ----------------------
 share/man/man4/bktr.4                |   6 +-
 share/man/man4/cd.4                  | 165 +++++++++++++--------------
 share/man/man4/ses.4                 |  13 +--
 share/man/man9/ifnet.9               |  17 +--
 sys/bus/cam/scsi/scsi_ses.h          |   4 +-
 sys/bus/u4b/audio/uaudio.c           |   4 +
 sys/dev/netif/wi/if_wavelan_ieee.h   |   2 +
 sys/dev/video/bktr/ioctl_bt848.h     |   3 +-
 sys/dev/video/meteor/ioctl_meteor.h  |  19 ---
 sys/gnu/vfs/ext2fs/ext2_fs.h         |   2 +
 sys/net/if.c                         |   1 -
 sys/net/pf/pfvar.h                   |  12 ++
 sys/net/tap/if_tap.c                 |   3 +-
 sys/net/tap/if_tap.h                 |   4 +-
 sys/netgraph/ng_message.h            |   2 +
 sys/netgraph7/ng_message.h           |   3 +-
 sys/platform/pc64/include/ioctl_fd.h |   2 -
 sys/sys/cdio.h                       |   4 +
 sys/sys/consio.h                     |  13 ---
 sys/sys/diskmbr.h                    |   2 +
 sys/sys/sockio.h                     |  12 +-
 sys/sys/soundcard.h                  |  22 ++++
 sys/sys/ttycom.h                     |   7 +-
 usr.sbin/fdcontrol/fdcontrol.8       |  22 +---
 usr.sbin/fdcontrol/fdcontrol.c       |  22 +---
 33 files changed, 171 insertions(+), 830 deletions(-)
 delete mode 100644 share/examples/meteor/README
 delete mode 100644 share/examples/meteor/rgb16.c
 delete mode 100644 share/examples/meteor/rgb24.c
 delete mode 100644 share/examples/meteor/test-n.c
 delete mode 100644 share/examples/meteor/yuvpk.c
 delete mode 100644 share/examples/meteor/yuvpl.c

diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc
index 239051315b..f911d95b35 100644
--- a/Makefile_upgrade.inc
+++ b/Makefile_upgrade.inc
@@ -3421,6 +3421,7 @@ TO_REMOVE+=/usr/include/netinet6/esp_camellia.h
 TO_REMOVE+=/usr/include/netinet6/esp_rijndael.h
 TO_REMOVE+=/usr/sbin/btxld
 TO_REMOVE+=/usr/share/man/man8/btxld.8.gz
+TO_REMOVE+=/usr/share/examples/meteor
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c
index 9f220836fa..78c1dfecc1 100644
--- a/libexec/rbootd/bpf.c
+++ b/libexec/rbootd/bpf.c
@@ -228,19 +228,11 @@ BpfGetIntfName(char **errmsg)
 	ifc.ifc_len = sizeof ibuf;
 	ifc.ifc_buf = (caddr_t)ibuf;
 
-#ifdef OSIOCGIFCONF
-	if (ioctl(fd, OSIOCGIFCONF, (char *)&ifc) < 0 ||
-	    ifc.ifc_len < sizeof(struct ifreq)) {
-		(void) strcpy(errbuf, "bpf: ioctl(OSIOCGIFCONF): %m");
-		return(NULL);
-	}
-#else
 	if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 ||
 	    ifc.ifc_len < sizeof(struct ifreq)) {
 		(void) strcpy(errbuf, "bpf: ioctl(SIOCGIFCONF): %m");
 		return(NULL);
 	}
-#endif
 	ifrp = ibuf;
 	ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len);
 
diff --git a/share/examples/meteor/README b/share/examples/meteor/README
deleted file mode 100644
index c242145d83..0000000000
--- a/share/examples/meteor/README
+++ /dev/null
@@ -1 +0,0 @@
-Example programs for the Matrox Meteor Video Capture Driver.
diff --git a/share/examples/meteor/rgb16.c b/share/examples/meteor/rgb16.c
deleted file mode 100644
index 4c7ee0703c..0000000000
--- a/share/examples/meteor/rgb16.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* capture a PPM image using RGB16  and single capture mode */
-
-/* Copyright (c) 1995 Mark Tinguely and Jim Lowe
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Tinguely and Jim Lowe
- * 4. The name of the author may not be used to endorse or promote products 
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/fcntl.h>
-/*#include <machine/ioctl_meteor.h>*/
-#include "/sys/i386/include/ioctl_meteor.h"
-
-extern int errno;
-#define ROWS 480
-#define COLS 640
-#define SIZE (ROWS * COLS * 2)
-main()
-{
-	struct meteor_geomet geo;
-	short *rgb16;
-	char b[4];
-	char header[16];
-	int i,o,c;
-
-	if ((i = open("/dev/meteor", O_RDONLY)) < 0) {
-		printf("open failed: %d\n", errno);
-		exit(1);
-	}
-				/* set up the capture type and size */
-        geo.rows = ROWS;
-        geo.columns = COLS;
-        geo.frames = 1;
-
-        geo.oformat = METEOR_GEO_RGB16;
-
-        if (ioctl(i, METEORSETGEO, &geo) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_FMT_NTSC;
-
-        if (ioctl(i, METEORSFMT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_INPUT_DEV0;
-
-        if (ioctl(i, METEORSINPUT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-        rgb16 = (short *)mmap((caddr_t)0,SIZE,PROT_READ,MAP_SHARED, i, (off_t)0);
-
-	if (rgb16 == (short *) MAP_FAILED) return (0);
-
-	c = METEOR_CAP_SINGLE ;
-        ioctl(i, METEORCAPTUR, &c);
-  
-	if ((o = open("rgb16.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
-		printf("ppm open failed: %d\n", errno);
-		exit(1);
-	}
-
-		/* make PPM header and save to file */
-	strcpy(&header[0], "P6 640 480 255 ");
-	header[2] = header[6]  = header[10] = header[14] = '\n';
-	write (o, &header[0], 15);
-
-	for (c = 0 ; c < ROWS*COLS; c++) {
-		b[0]= ((*rgb16 >> 7) & 0xf8);	/* r */
-		b[1]= ((*rgb16 >> 2) & 0xf8);	/* g */
-		b[2]= ((*rgb16++ << 3) & 0xf8);	/* b */
-		write(o, &b[0], 3);
-	}
-	close(o);
-	close(i);
-	exit(0);
-}
diff --git a/share/examples/meteor/rgb24.c b/share/examples/meteor/rgb24.c
deleted file mode 100644
index f2969022bb..0000000000
--- a/share/examples/meteor/rgb24.c
+++ /dev/null
@@ -1,101 +0,0 @@
-	/* capture a PPM file using 24 bit RGB image and read() */
-/* Copyright (c) 1995 Mark Tinguely and Jim Lowe 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Tinguely and Jim Lowe
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/fcntl.h>
-/*#include <machine/ioctl_meteor.h>*/
-#include "/sys/i386/include/ioctl_meteor.h"
-
-extern int errno;
-#define ROWS 300
-#define COLS 400
-#define SIZE (ROWS * COLS * 4)
-main()
-{
-	struct meteor_geomet geo;
-	char buf[SIZE],b[4],header[16],*p;
-	int i,o,c;
-
-	if ((i = open("/dev/meteor", O_RDONLY)) < 0) {
-		printf("open failed: %d\n", errno);
-		exit(1);
-	}
-				/* set up the capture type and size */
-        geo.rows = ROWS;
-        geo.columns = COLS;
-        geo.frames = 1;
-        geo.oformat = METEOR_GEO_RGB24 ;
-
-        if (ioctl(i, METEORSETGEO, &geo) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_FMT_NTSC;
-
-        if (ioctl(i, METEORSFMT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_INPUT_DEV0;
-
-        if (ioctl(i, METEORSINPUT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	if ((c=read(i, &buf[0], SIZE)) < SIZE) {
-		printf("read failed %d %d %d\n", c, i, errno);
-		close(i);
-		exit(1);
-	}
-	close(i);
-
-	if ((o = open("rgb24.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
-		printf("ppm open failed: %d\n", errno);
-		exit(1);
-	}
-
-		/* make PPM header and save to file */
-	strcpy(&header[0], "P6 400 300 255 ");
-	header[2] = header[6]  = header[10] = header[14] = '\n';
-	write (o, &header[0], 15);
-		/* save the RGB data to PPM file */
-	for (p = &buf[0]; p < &buf[SIZE]; ) {
-		b[2] = *p++;		/* blue */
-		b[1] = *p++;		/* green */
-		b[0] = *p++;		/* red */
-		*p++;			/* NULL byte */
-		write(o,&b[0], 3);	/* not very efficient */
-	}
-	close(o);
-	exit(0);
-}
diff --git a/share/examples/meteor/test-n.c b/share/examples/meteor/test-n.c
deleted file mode 100644
index 4651654c96..0000000000
--- a/share/examples/meteor/test-n.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* A simple program to test the communication between the matrox meteor
- * driver and an user application in the continous sync capture mode.
- * 
- * First the driver clears the mask and decrements the counter like it
- * would in a normal application. Then it purpose does not handle these
- * responsibilities to simulate an application falling behind. I use
- * the HUP signal to work as if the some of the  buffers were removed
- * (the second couter is used to cleared the correct bits.
- *
- *	build kernel with at least:
- *
- *		options "METEOR_ALLOC_PAGES=301"  
- *
- */
-/* Copyright (c) 1995 Mark Tinguely and Jim Lowe 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Tinguely and Jim Lowe
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/fcntl.h>
-/*#include <machine/ioctl_meteor.h> */
-#include "/sys/i386/include/ioctl_meteor.h"
-
-typedef unsigned char uint8;
-typedef signed char int8;
-
-int i;
-static uint8 *y;
-extern int errno;
-struct meteor_mem *common_mem;
-int sig_cnt;
-int sig_cnt2;
-
-void
-hup_catcher()
-{
-	/* clear 4 oldest active bits */
-	common_mem->active &= ~(1 << (sig_cnt2++ % 32));
-	common_mem->active &= ~(1 << (sig_cnt2++ % 32));
-	common_mem->active &= ~(1 << (sig_cnt2++ % 32));
-	common_mem->active &= ~(1 << (sig_cnt2++ % 32));
-	/* lowat is low enough that I will need 2 hups to start saving again */
-	common_mem->num_active_bufs -= 4;
-	puts("hup caught");
-}
-
-void
-usr2_catcher()
-{
-	int j;
-	struct meteor_capframe capframe;
-
-	printf("active %3d = %08x ", sig_cnt,common_mem->active);
-	printf("# act  %3d = %d\n", sig_cnt, common_mem->num_active_bufs);
-
-	if (sig_cnt < 80) {
-		common_mem->active &= ~(1 << (sig_cnt % 32));
-		common_mem->num_active_bufs--; 
-		sig_cnt2++;
-	}
-
-	printf("data %08x\n", *((u_long *) (y + (sig_cnt % 32) *
-						common_mem->frame_size)));
-	if (++sig_cnt >= 200) {
-		capframe.command=METEOR_CAP_STOP_FRAMES;
-
-		if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
-			printf("METEORCAPFRM failed %d\n", errno);
-			exit(1);
-		}
-		exit (0);
-	}
-}
-
-main()
-{
-	struct meteor_geomet geo;
-	int height, width, depth, frames, size;
-	struct meteor_capframe capframe;
-
-	if ((i = open("/dev/meteor", O_RDONLY)) < 0) {
-		printf("open failed\n");
-		exit(1);
-	}
-	printf("test %d %d\n", errno, i);
-
-        height = geo.rows = 120;
-        width= geo.columns = 160;
-        frames = geo.frames = 32;
-	depth = 2;			/* 2 bytes per pixel */
-
-	printf("ioctl %d %d\n", errno, i);
-
-        geo.oformat = METEOR_GEO_RGB16;
-
-        if (ioctl(i, METEORSETGEO, &geo) < 0) {
-		printf("METEORSETGEO failed %d\n", errno);
-		exit(1);
-	}
-
-	printf("mmap %d %d\n", errno, i);
-	size = ((width*height*depth*frames+4095)/4096)*4096;
-        y=(uint8 *) mmap((caddr_t)0, size + 4096, PROT_READ |PROT_WRITE,MAP_SHARED, i, (off_t)0);
-
-	if (y == (uint8 *) MAP_FAILED) return (0);
-
-	common_mem = (struct meteor_mem *) (y + size);
-
-	signal(1, hup_catcher);
-	signal(31, usr2_catcher);
-
-	capframe.command=METEOR_CAP_N_FRAMES;
-	capframe.signal=31;
-	capframe.lowat=25;
-	capframe.hiwat=30;
-
-	printf("ioctl %d %d\n", errno, i);
-        if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
-		printf("METEORCAPFRM failed %d\n", errno);
-		exit(1);
-	}
-
-	printf("signal = %d\n", common_mem->signal);
-	printf("frame size = %d\n", common_mem->frame_size);
-	printf("buffers = %d\n", common_mem->num_bufs);
-	printf("hiwater = %d\n", common_mem->hiwat);
-	printf("lowater = %d\n", common_mem->lowat);
-	printf("active = %08x\n", common_mem->active);
-	printf("# active = %d\n", common_mem->num_active_bufs);
-  
-	printf("sleep loop\n", errno, i);
-	while (1) {
-		sleep (60);
-	}
-}
diff --git a/share/examples/meteor/yuvpk.c b/share/examples/meteor/yuvpk.c
deleted file mode 100644
index 6ebd2e4620..0000000000
--- a/share/examples/meteor/yuvpk.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* capture a PPM image using YUV packed format and single capture mode */
-/* Copyright (c) 1995 Mark Tinguely and Jim Lowe 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Tinguely and Jim Lowe
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/fcntl.h>
-/*#include <machine/ioctl_meteor.h>*/
-#include "/sys/i386/include/ioctl_meteor.h"
-
-typedef unsigned char uint8;
-typedef signed char int8;
-
-static int8 *yuv_data;
-extern int errno;
-#define ROWS 480
-#define COLS 640
-#define SIZE (ROWS * COLS * 2)
-main()
-{
-	struct meteor_geomet geo;
-	char b[4],header[16],*p;
-	int i,o,c,r;
-	int y1,y2,u,v;
-
-	if ((i = open("/dev/meteor", O_RDONLY)) < 0) {
-		printf("open failed: %d\n", errno);
-		exit(1);
-	}
-				/* set up the capture type and size */
-        geo.rows = ROWS;
-        geo.columns = COLS;
-        geo.frames = 1;
-
-
-        geo.oformat = METEOR_GEO_YUV_PACKED;
-
-        if (ioctl(i, METEORSETGEO, &geo) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_FMT_NTSC;
-
-        if (ioctl(i, METEORSFMT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_INPUT_DEV0;
-
-        if (ioctl(i, METEORSINPUT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-        yuv_data = (uint8 *)mmap((caddr_t)0,SIZE,PROT_READ,MAP_SHARED, i, (off_t)0);
-
-	if (yuv_data == (int8 *) MAP_FAILED) return (0);
-
-	c = METEOR_CAP_SINGLE ;
-        ioctl(i, METEORCAPTUR, &c);
-  
-	if ((o = open("yuvpk.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
-		printf("ppm open failed: %d\n", errno);
-		exit(1);
-	}
-
-		/* make PPM header and save to file */
-	strcpy(&header[0], "P6 640 480 255 ");
-	header[2] = header[6]  = header[10] = header[14] = '\n';
-	write (o, &header[0], 15);
-
-	for (c = 0 ; c < ROWS*COLS; c+=2) {
-		u = *yuv_data++; 
-		if ((y1 = *yuv_data++) < 0) y1 += 256;
-		v = *yuv_data++;
-		if ((y2 = *yuv_data++) < 0) y2 += 256;
-
-		b[0]= (double)y1  + 1.375 * (double)v ; /*r*/
-		b[1]= (double)y1 - 0.703125 * (double)v -0.34375 * (double)u ;	/* g */
-		b[2]= (double)y1 + 1.734375 * (double)u ;		/* b */
-		b[3]= (double)y2  + 1.375 * (double)v ; /*r*/
-		b[4]= (double)y2 - 0.703125 * (double)v -0.34375 * (double)u ;	/* g */
-		b[5]= (double)y2 + 1.734375 * (double)u ;		/* b */
-		write(o,&b[0], 6);
-	}
-	close(o);
-	close(i);
-	exit(0);
-}
diff --git a/share/examples/meteor/yuvpl.c b/share/examples/meteor/yuvpl.c
deleted file mode 100644
index 704dfce331..0000000000
--- a/share/examples/meteor/yuvpl.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/* capture a PPM image using YUV planer format and single capture mode */
-/* Copyright (c) 1995 Mark Tinguely and Jim Lowe 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Mark Tinguely and Jim Lowe
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/fcntl.h>
-/*#include <machine/ioctl_meteor.h>*/                             
-#include "/sys/i386/include/ioctl_meteor.h"                   
-
-
-typedef unsigned char uint8;
-typedef signed char int8;
-
-static uint8 *yuv_data;
-static int8 *ue, *uo, *ve, *vo;
-extern int errno;
-#define ROWS 480
-#define COLS 640
-#define SIZE (ROWS * COLS * 2)
-main()
-{
-	struct meteor_geomet geo;
-	char b[4],header[16],*p;
-	int i,o,c,r;
-	int y1,y2,u,v;
-	int temp;
-
-	if ((i = open("/dev/meteor", O_RDONLY)) < 0) {
-		printf("open failed: %d\n", errno);
-		exit(1);
-	}
-				/* set up the capture type and size */
-        geo.rows = ROWS;
-        geo.columns = COLS;
-        geo.frames = 1;
-
-
-        geo.oformat = METEOR_GEO_YUV_PLANER;
-
-        if (ioctl(i, METEORSETGEO, &geo) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_FMT_NTSC;
-
-        if (ioctl(i, METEORSFMT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-	c = METEOR_INPUT_DEV0;
-
-        if (ioctl(i, METEORSINPUT, &c) < 0) {
-		printf("ioctl failed: %d\n", errno);
-		exit(1);
-	}
-
-        yuv_data = (uint8 *)mmap((caddr_t)0,SIZE,PROT_READ,MAP_SHARED, i, (off_t)0);
-
-	if (yuv_data == (uint8 *) MAP_FAILED) return (0);
-
-	temp = ROWS * COLS;
-	ue = yuv_data + temp;
-	temp = temp / 4;
-	ve = ue + temp;
-	uo = ve + temp;
-	vo = uo + temp;
-
-printf("data locations = %08x %08x %08x %08x %08x \n", yuv_data,ue,ve,uo,vo);
-
-	c = METEOR_CAP_SINGLE ;
-        ioctl(i, METEORCAPTUR, &c);
-  
-	printf("read done %d %d\n", errno, i);
-	if ((o = open("yuvpl.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
-		printf("ppm open failed: %d\n", errno);
-		exit(1);
-	}
-
-		/* make PPM header and save to file */
-	strcpy(&header[0], "P6 640 480 255 ");
-	header[2] = header[6]  = header[10] = header[14] = '\n';
-	write (o, &header[0], 15);
-
-	for (r = 0 ; r < ROWS ; r++) {
-	   for (c = 0 ; c < COLS / 2; c++) {
-		if ((y1 = *yuv_data++) < 0) y1 += 256;
-		if ((y2 = *yuv_data++) < 0) y2 += 256;
-		if (r & 1) { /* odd */
-			u =   *uo++ ;
-			v =   *vo++;
-		}
-		else { /* even */
-			u =   *ue++;
-			v =   *ve++;
-		}
-		b[0]= (double)y1  + 1.375 * (double)v ; /*r*/
-		b[1]= (double)y1 - 0.703125 * (double)v -0.34375 * (double)u ;	/* g */
-		b[2]= (double)y1 + 1.734375 * (double)u ;		/* b */
-		b[3]= (double)y2  + 1.375 * (double)v ; /*r*/
-		b[4]= (double)y2 - 0.703125 * (double)v -0.34375 * (double)u ;	/* g */
-		b[5]= (double)y2 + 1.734375 * (double)u ;		/* b */
-		write(o,&b[0], 6);
-	 }
-	}
-	close(o);
-	close(i);
-	exit(0);
-}
diff --git a/share/man/man4/bktr.4 b/share/man/man4/bktr.4
index c299aece77..bcc7fab605 100644
--- a/share/man/man4/bktr.4
+++ b/share/man/man4/bktr.4
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man4/bktr.4,v 1.31 2006/01/21 14:58:25 netchild Exp $
 .\"
-.Dd February 24, 2011
+.Dd May 28, 2018
 .Dt BKTR 4
 .Os
 .Sh NAME
@@ -221,9 +221,7 @@ Video Highway XTreme
 VideoLogic Captivator PCI
 .El
 .Sh FILES
-.Bl -tag -width /usr/share/examples/meteor -compact
-.It Pa /usr/share/examples/meteor
-Examples of what you could do with the (similarly designed) Meteor driver.
+.Bl -tag -width ".Pa multimedia/fxtv" -compact
 .It Pa multimedia/fxtv
 A TV and Camera display program utilizing the bktr driver.
 .It Pa misc/alevt
diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4
index 7357391ca2..566cd58a04 100644
--- a/share/man/man4/cd.4
+++ b/share/man/man4/cd.4
@@ -24,9 +24,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/cd.4,v 1.17.2.8 2003/06/03 14:32:09 hmp Exp $
-.\" $DragonFly: src/share/man/man4/cd.4,v 1.6 2008/05/02 02:05:05 swildner Exp $
 .\"
-.Dd October 10, 1998
+.Dd May 28, 2018
 .Dt CD 4
 .Os
 .Sh NAME
@@ -128,69 +127,69 @@ read from the scsi inquiry commands, and should be the same as
 the information printed at boot.
 This structure is defined in
 .Xr disklabel 5 .
-.It Dv CDIOCCAPABILITY
-.Pq Li "struct ioc_capability"
-Retrieve information from the drive on what features it supports.
-The information is returned in the following structure:
-.Bd -literal -offset indent
-struct ioc_capability {
-	u_long	play_function;
-#define CDDOPLAYTRK	0x00000001
-	/* Can play tracks/index */
-#define	CDDOPLAYMSF	0x00000002
-	/* Can play msf to msf */
-#define	CDDOPLAYBLOCKS	0x00000004
-	/* Can play range of blocks */
-#define	CDDOPAUSE	0x00000100
-	/* Output can be paused */
-#define	CDDORESUME	0x00000200
-	/* Output can be resumed */
-#define	CDDORESET	0x00000400
-	/* Drive can be completely reset */
-#define	CDDOSTART	0x00000800
-	/* Audio can be started */
-#define CDDOSTOP	0x00001000
-	/* Audio can be stopped */
-#define CDDOPITCH	0x00002000
-	/* Audio pitch can be changed */
-
-	u_long	routing_function;
-#define CDREADVOLUME	0x00000001
-	/* Volume settings can be read */
-#define CDSETVOLUME	0x00000002
-	/* Volume settings can be set */
-#define	CDSETMONO	0x00000100
-	/* Output can be set to mono */
-#define CDSETSTEREO	0x00000200
-	/* Output can be set to stereo (def) */
-#define	CDSETLEFT	0x00000400
-	/* Output can be set to left only */
-#define	CDSETRIGHT	0x00000800
-	/* Output can be set to right only */
-#define	CDSETMUTE	0x00001000
-	/* Output can be muted */
-#define CDSETPATCH	0x00008000
-	/* Direct routing control allowed */
-
-	u_long	special_function;
-#define	CDDOEJECT	0x00000001
-	/* The tray can be opened */
-#define	CDDOCLOSE	0x00000002
-	/* The tray can be closed */
-#define	CDDOLOCK	0x00000004
-	/* The tray can be locked */
-#define CDREADHEADER	0x00000100
-	/* Can read Table of Contents */
-#define	CDREADENTRIES	0x00000200
-	/* Can read TOC Entries */
-#define	CDREADSUBQ	0x00000200
-	/* Can read Subchannel info */
-#define CDREADRW	0x00000400
-	/* Can read subcodes R-W */
-#define	CDHASDEBUG	0x00004000
-	/* The tray has dynamic debugging */
-};
-.Ed
+.\".It Dv CDIOCCAPABILITY
+.\".Pq Li "struct ioc_capability"
+.\"Retrieve information from the drive on what features it supports.
+.\"The information is returned in the following structure:
+.\".Bd -literal -offset indent
+.\"struct ioc_capability {
+.\"	u_long	play_function;
+.\"#define CDDOPLAYTRK	0x00000001
+.\"	/* Can play tracks/index */
+.\"#define	CDDOPLAYMSF	0x00000002
+.\"	/* Can play msf to msf */
+.\"#define	CDDOPLAYBLOCKS	0x00000004
+.\"	/* Can play range of blocks */
+.\"#define	CDDOPAUSE	0x00000100
+.\"	/* Output can be paused */
+.\"#define	CDDORESUME	0x00000200
+.\"	/* Output can be resumed */
+.\"#define	CDDORESET	0x00000400
+.\"	/* Drive can be completely reset */
+.\"#define	CDDOSTART	0x00000800
+.\"	/* Audio can be started */
+.\"#define CDDOSTOP	0x00001000
+.\"	/* Audio can be stopped */
+.\"#define CDDOPITCH	0x00002000
+.\"	/* Audio pitch can be changed */
+.\"
+.\"	u_long	routing_function;
+.\"#define CDREADVOLUME	0x00000001
+.\"	/* Volume settings can be read */
+.\"#define CDSETVOLUME	0x00000002
+.\"	/* Volume settings can be set */
+.\"#define	CDSETMONO	0x00000100
+.\"	/* Output can be set to mono */
+.\"#define CDSETSTEREO	0x00000200
+.\"	/* Output can be set to stereo (def) */
+.\"#define	CDSETLEFT	0x00000400
+.\"	/* Output can be set to left only */
+.\"#define	CDSETRIGHT	0x00000800
+.\"	/* Output can be set to right only */
+.\"#define	CDSETMUTE	0x00001000
+.\"	/* Output can be muted */
+.\"#define CDSETPATCH	0x00008000
+.\"	/* Direct routing control allowed */
+.\"
+.\"	u_long	special_function;
+.\"#define	CDDOEJECT	0x00000001
+.\"	/* The tray can be opened */
+.\"#define	CDDOCLOSE	0x00000002
+.\"	/* The tray can be closed */
+.\"#define	CDDOLOCK	0x00000004
+.\"	/* The tray can be locked */
+.\"#define CDREADHEADER	0x00000100
+.\"	/* Can read Table of Contents */
+.\"#define	CDREADENTRIES	0x00000200
+.\"	/* Can read TOC Entries */
+.\"#define	CDREADSUBQ	0x00000200
+.\"	/* Can read Subchannel info */
+.\"#define CDREADRW	0x00000400
+.\"	/* Can read subcodes R-W */
+.\"#define	CDHASDEBUG	0x00004000
+.\"	/* The tray has dynamic debugging */
+.\"};
+.\".Ed
 .It Dv CDIOCPLAYTRACKS
 .Pq Li "struct ioc_play_track"
 Start audio playback given a track address and length.
@@ -334,24 +333,24 @@ Eject the
 .It Dv CDIOCCLOSE
 Tell the drive to close its door and load the media.
 Not all drives support this feature.
-.It Dv CDIOCPITCH
-.Pq Li "struct ioc_pitch"
-For drives that support it, this command instructs the drive to play
-the audio at a faster or slower rate than normal.
-Values of
-.Li speed
-between -32767 and -1 result in slower playback; a zero value
-indicates normal speed; and values from 1 to 32767 give faster
-playback.
-Drives with less than 16 bits of resolution will silently
-ignore less-significant bits.
-The structure is defined thusly:
-.Bd -literal -offset indent
-struct	ioc_pitch
-{
-	short	speed;
-};
-.Ed
+.\".It Dv CDIOCPITCH
+.\".Pq Li "struct ioc_pitch"
+.\"For drives that support it, this command instructs the drive to play
+.\"the audio at a faster or slower rate than normal.
+.\"Values of
+.\".Li speed
+.\"between -32767 and -1 result in slower playback; a zero value
+.\"indicates normal speed; and values from 1 to 32767 give faster
+.\"playback.
+.\"Drives with less than 16 bits of resolution will silently
+.\"ignore less-significant bits.
+.\"The structure is defined thusly:
+.\".Bd -literal -offset indent
+.\"struct	ioc_pitch
+.\"{
+.\"	short	speed;
+.\"};
+.\".Ed
 .El
 .Sh NOTES
 When a
diff --git a/share/man/man4/ses.4 b/share/man/man4/ses.4
index 46b985dde1..6806bd4b07 100644
--- a/share/man/man4/ses.4
+++ b/share/man/man4/ses.4
@@ -24,9 +24,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/ses.4,v 1.2.2.6 2001/08/17 13:08:39 ru Exp $
-.\" $DragonFly: src/share/man/man4/ses.4,v 1.4 2008/05/02 02:05:05 swildner Exp $
 .\"
-.Dd January 29, 2000
+.Dd May 29, 2018
 .Dt SES 4
 .Os
 .Sh NAME
@@ -98,11 +97,11 @@ Set the overall enclosure status.
 Get the status of a particular object.
 .It Dv SESIOC_SETOBJSTAT
 Set the status of a particular object.
-.It Dv SESIOC_GETTEXT
-Get the associated help text for an object (not yet implemented).
-.Nm
-devices often have descriptive text for an object which can tell
-you things like location (e.g, "left power supply").
+.\".It Dv SESIOC_GETTEXT
+.\"Get the associated help text for an object (not yet implemented).
+.\".Nm
+.\"devices often have descriptive text for an object which can tell
+.\"you things like location (e.g, "left power supply").
 .It Dv SESIOC_INIT
 Initialize the enclosure.
 .El
diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9
index 5a27c3cb4a..128a4dfe9b 100644
--- a/share/man/man9/ifnet.9
+++ b/share/man/man9/ifnet.9
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man9/ifnet.9,v 1.9.2.10 2003/06/15 02:22:30 hmp Exp $
 .\"
-.Dd July 19, 2016
+.Dd May 29, 2018
 .Dt IFNET 9
 .Os
 .Sh NAME
@@ -838,9 +838,8 @@ further interpretation.
 The following commands are handled by
 .Fn ifioctl :
 .Pp
-.Bl -tag -width ".Dv OSIOCGIFNETMASK" -offset indent -compact
+.Bl -tag -width ".Dv SIOCSIFDSTADDR" -offset indent -compact
 .It Dv SIOCGIFCONF
-.It Dv OSIOCGIFCONF
 Get interface configuration.
 (No call-down to driver.)
 .Pp
@@ -900,18 +899,6 @@ function is called to perform the operation; qq.v.
 .It Dv SIOCSIFNETMASK
 The socket's protocol control routine is called to implement the
 requested action.
-.Pp
-.It Dv OSIOCGIFADDR
-.It Dv OSIOCGIFDSTADDR
-.It Dv OSIOCGIFBRDADDR
-.It Dv OSIOCGIFNETMASK
-The socket's protocol control routine is called to implement the
-requested action.
-On return,
-.Vt sockaddr
-structures are converted into old-style (no
-.Va sa_len
-member).
 .El
 .El
 .Pp
diff --git a/sys/bus/cam/scsi/scsi_ses.h b/sys/bus/cam/scsi/scsi_ses.h
index c4768ee99c..a19a773fec 100644
--- a/sys/bus/cam/scsi/scsi_ses.h
+++ b/sys/bus/cam/scsi/scsi_ses.h
@@ -1,5 +1,4 @@
 /* $FreeBSD: src/sys/cam/scsi/scsi_ses.h,v 1.2 2000/01/15 22:40:04 mjacob Exp $ */
-/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.h,v 1.3 2007/12/02 01:54:27 pavalos Exp $ */
 /*
  * Copyright (c) 2000 by Matthew Jacob
  * All rights reserved.
@@ -27,7 +26,6 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
  */
 
 #include <sys/ioccom.h>
@@ -39,7 +37,9 @@
 #define	SESIOC_SETENCSTAT	_IO(SESIOC, 4)
 #define	SESIOC_GETOBJSTAT	_IO(SESIOC, 5)
 #define	SESIOC_SETOBJSTAT	_IO(SESIOC, 6)
+#if 0 /* unimplemented */
 #define	SESIOC_GETTEXT		_IO(SESIOC, 7)
+#endif
 #define	SESIOC_INIT		_IO(SESIOC, 8)
 
 /*
diff --git a/sys/bus/u4b/audio/uaudio.c b/sys/bus/u4b/audio/uaudio.c
index 67a2911132..13cc5884cd 100644
--- a/sys/bus/u4b/audio/uaudio.c
+++ b/sys/bus/u4b/audio/uaudio.c
@@ -3534,11 +3534,13 @@ uaudio_mixer_add_feature(struct uaudio_softc *sc,
 			MIX(sc).name = "boost";
 			break;
 
+#if 0 /* XXX unimplemented */
 		case LOUDNESS_CONTROL:
 			MIX(sc).type = MIX_ON_OFF;
 			MIX(sc).ctl = SOUND_MIXER_LOUD;	/* Is this correct ? */
 			MIX(sc).name = "loudness";
 			break;
+#endif
 
 		default:
 			MIX(sc).type = MIX_UNKNOWN;
@@ -3646,12 +3648,14 @@ uaudio20_mixer_add_feature(struct uaudio_softc *sc,
 			MIX(sc).name = "boost";
 			what = BASS_BOOST_CONTROL;
 			break;
+#if 0 /* XXX unimplemented */
 		case (3 << 18):
 			MIX(sc).type = MIX_ON_OFF;
 			MIX(sc).ctl = SOUND_MIXER_LOUD;	/* Is this correct ? */
 			MIX(sc).name = "loudness";
 			what = LOUDNESS_CONTROL;
 			break;
+#endif
 		case (3 << 20):
 			MIX(sc).type = MIX_SIGNED_16;
 			MIX(sc).ctl = mixernumber;
diff --git a/sys/dev/netif/wi/if_wavelan_ieee.h b/sys/dev/netif/wi/if_wavelan_ieee.h
index 9dc7431bf0..2e4c0d1063 100644
--- a/sys/dev/netif/wi/if_wavelan_ieee.h
+++ b/sys/dev/netif/wi/if_wavelan_ieee.h
@@ -728,11 +728,13 @@ struct wi_scan_p2_hdr {
 #define WI_PRISM2_RES_SIZE	62
 
 
+#if 0 /* unimplemented */
 /*
  * prism2 debug mode definitions
  */
 #define SIOCSPRISM2DEBUG	_IOW('i', 137, struct ifreq)
 #define SIOCGPRISM2DEBUG	_IOWR('i', 138, struct ifreq)
+#endif
 
 #define WI_DEBUG_RESET		0x00
 #define WI_DEBUG_INIT		0x01
diff --git a/sys/dev/video/bktr/ioctl_bt848.h b/sys/dev/video/bktr/ioctl_bt848.h
index b38ce56a34..a511ff3ff8 100644
--- a/sys/dev/video/bktr/ioctl_bt848.h
+++ b/sys/dev/video/bktr/ioctl_bt848.h
@@ -2,7 +2,6 @@
  * extensions to ioctl_meteor.h for the bt848 cards
  *
  * $FreeBSD: src/sys/dev/bktr/ioctl_bt848.h,v 1.30 2003/12/20 17:12:25 obrien Exp $
- * $DragonFly: src/sys/dev/video/bktr/ioctl_bt848.h,v 1.1 2004/05/15 17:54:13 joerg Exp $
  */
 
 #ifndef  _DEV_BKTR_IOCTL_BT848_H_
@@ -226,7 +225,9 @@ struct _bktr_clip {
 
 /* set clip list */
 #define BT848SCLIP     _IOW('x', 66, struct _bktr_clip )
+#if 0 /* unimplemented */
 #define BT848GCLIP     _IOR('x', 66, struct _bktr_clip )
+#endif
 
 
 /* set input format */
diff --git a/sys/dev/video/meteor/ioctl_meteor.h b/sys/dev/video/meteor/ioctl_meteor.h
index a1f90b4ec8..78c92a10f6 100644
--- a/sys/dev/video/meteor/ioctl_meteor.h
+++ b/sys/dev/video/meteor/ioctl_meteor.h
@@ -29,7 +29,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/bktr/ioctl_meteor.h,v 1.15 2003/12/20 17:12:25 obrien Exp $
- * $DragonFly: src/sys/dev/video/meteor/ioctl_meteor.h,v 1.1 2004/05/15 17:54:13 joerg Exp $
  */
 
 /*
@@ -44,12 +43,6 @@
 #endif
 #include <sys/ioccom.h>
 
-struct meteor_capframe {
-	short	command;	/* see below for valid METEORCAPFRM commands */
-	short	lowat;		/* start transfer if < this number */
-	short	hiwat;		/* stop transfer if > this number */
-} ;
-
 /* structure for METEOR[GS]ETGEO - get/set geometry  */
 struct meteor_geomet {
 	u_short		rows;
@@ -76,9 +69,7 @@ struct meteor_video {
 };
 
 #define METEORCAPTUR _IOW('x', 1, int)			 /* capture a frame */
-#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe)  /* sync capture */
 #define METEORSETGEO _IOW('x', 3, struct meteor_geomet)  /* set geometry */
-#define METEORGETGEO _IOR('x', 4, struct meteor_geomet)  /* get geometry */
 #define METEORSTATUS _IOR('x', 5, unsigned short)	/* get status */
 #define METEORSHUE   _IOW('x', 6, signed char)		/* set hue */
 #define METEORGHUE   _IOR('x', 6, signed char)		/* get hue */
@@ -86,8 +77,6 @@ struct meteor_video {
 #define METEORGFMT   _IOR('x', 7, unsigned long)	/* get format */
 #define METEORSINPUT _IOW('x', 8, unsigned long)	/* set input dev */
 #define METEORGINPUT _IOR('x', 8, unsigned long)	/* get input dev */
-#define	METEORSCHCV  _IOW('x', 9, unsigned char)	/* set uv gain */
-#define	METEORGCHCV  _IOR('x', 9, unsigned char)	/* get uv gain */
 #define	METEORSCOUNT _IOW('x',10, struct meteor_counts)
 #define	METEORGCOUNT _IOR('x',10, struct meteor_counts)
 #define METEORSFPS   _IOW('x',11, unsigned short)	/* set fps */
@@ -102,14 +91,6 @@ struct meteor_video {
 #define METEORGCSAT  _IOR('x', 15, unsigned char)	/* get uv saturation */
 #define	METEORSCONT  _IOW('x', 16, unsigned char)	/* set contrast */
 #define	METEORGCONT  _IOR('x', 16, unsigned char)	/* get contrast */
-#define METEORSBT254 _IOW('x', 17, unsigned short)	/* set Bt254 reg */
-#define METEORGBT254 _IOR('x', 17, unsigned short)	/* get Bt254 reg */
-#define METEORSHWS   _IOW('x', 18, unsigned char)	/* set hor start reg */
-#define METEORGHWS   _IOR('x', 18, unsigned char)	/* get hor start reg */
-#define METEORSVWS   _IOW('x', 19, unsigned char)	/* set vert start reg */
-#define METEORGVWS   _IOR('x', 19, unsigned char)	/* get vert start reg */
-#define	METEORSTS    _IOW('x', 20, unsigned char)	/* set time stamp */
-#define	METEORGTS    _IOR('x', 20, unsigned char)	/* get time stamp */
 
 #define	METEOR_STATUS_ID_MASK	0xf000	/* ID of 7196 */
 #define	METEOR_STATUS_DIR	0x0800	/* Direction of Expansion port YUV */
diff --git a/sys/gnu/vfs/ext2fs/ext2_fs.h b/sys/gnu/vfs/ext2fs/ext2_fs.h
index 0a5ca16d43..56549c7565 100644
--- a/sys/gnu/vfs/ext2fs/ext2_fs.h
+++ b/sys/gnu/vfs/ext2fs/ext2_fs.h
@@ -261,6 +261,7 @@ struct ext2_group_desc
 #define EXT2_FL_USER_VISIBLE		0x00001FFF /* User visible flags */
 #define EXT2_FL_USER_MODIFIABLE		0x000000FF /* User modifiable flags */
 
+#if 0 /* unimplemented */
 /*
  * ioctl commands
  */
@@ -268,6 +269,7 @@ struct ext2_group_desc
 #define	EXT2_IOC_SETFLAGS		_IOW('f', 2, long)
 #define	EXT2_IOC_GETVERSION		_IOR('v', 1, long)
 #define	EXT2_IOC_SETVERSION		_IOW('v', 2, long)
+#endif
 
 /*
  * Only declare `struct ext2_inode' if <vfs/ufs/inode.h> hasn't made things
diff --git a/sys/net/if.c b/sys/net/if.c
index 1d944f2654..6869092dcf 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1826,7 +1826,6 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct ucred *cred)
 
 	switch (cmd) {
 	case SIOCGIFCONF:
-	case OSIOCGIFCONF:
 		return (ifconf(cmd, data, cred));
 	default:
 		break;
diff --git a/sys/net/pf/pfvar.h b/sys/net/pf/pfvar.h
index 697908cf4a..b10bb52548 100644
--- a/sys/net/pf/pfvar.h
+++ b/sys/net/pf/pfvar.h
@@ -1674,9 +1674,13 @@ struct pfioc_iface {
 
 #define DIOCSTART	_IO  ('D',  1)
 #define DIOCSTOP	_IO  ('D',  2)
+#if 0 /* unimplemented */
 #define DIOCBEGINRULES	_IOWR('D',  3, struct pfioc_rule)
+#endif
 #define DIOCADDRULE	_IOWR('D',  4, struct pfioc_rule)
+#if 0 /* unimplemented */
 #define DIOCCOMMITRULES	_IOWR('D',  5, struct pfioc_rule)
+#endif
 #define DIOCGETRULES	_IOWR('D',  6, struct pfioc_rule)
 #define DIOCGETRULE	_IOWR('D',  7, struct pfioc_rule)
 /* XXX cut 8 - 17 */
@@ -1699,9 +1703,13 @@ struct pfioc_iface {
 #define DIOCKILLSTATES	_IOWR('D', 41, struct pfioc_state_kill)
 #define DIOCSTARTALTQ	_IO  ('D', 42)
 #define DIOCSTOPALTQ	_IO  ('D', 43)
+#if 0 /* unimplemented */
 #define DIOCBEGINALTQS	_IOWR('D', 44, u_int32_t)
+#endif
 #define DIOCADDALTQ	_IOWR('D', 45, struct pfioc_altq)
+#if 0 /* unimplemented */
 #define DIOCCOMMITALTQS	_IOWR('D', 46, u_int32_t)
+#endif
 #define DIOCGETALTQS	_IOWR('D', 47, struct pfioc_altq)
 #define DIOCGETALTQ	_IOWR('D', 48, struct pfioc_altq)
 #define DIOCCHANGEALTQ	_IOWR('D', 49, struct pfioc_altq)
@@ -1729,8 +1737,10 @@ struct pfioc_iface {
 #define DIOCRCLRASTATS  _IOWR('D', 72, struct pfioc_table)
 #define	DIOCRTSTADDRS	_IOWR('D', 73, struct pfioc_table)
 #define	DIOCRSETTFLAGS	_IOWR('D', 74, struct pfioc_table)
+#if 0 /* unimplemented */
 #define DIOCRINABEGIN	_IOWR('D', 75, struct pfioc_table)
 #define DIOCRINACOMMIT	_IOWR('D', 76, struct pfioc_table)
+#endif
 #define DIOCRINADEFINE	_IOWR('D', 77, struct pfioc_table)
 #define DIOCOSFPFLUSH	_IO('D', 78)
 #define DIOCOSFPADD	_IOWR('D', 79, struct pf_osfp_ioctl)
@@ -1742,7 +1752,9 @@ struct pfioc_iface {
 #define DIOCCLRSRCNODES	_IO('D', 85)
 #define DIOCSETHOSTID	_IOWR('D', 86, u_int32_t)
 #define DIOCIGETIFACES	_IOWR('D', 87, struct pfioc_iface)
+#if 0 /* unimplemented */
 #define DIOCICLRISTATS  _IOWR('D', 88, struct pfioc_iface)
+#endif
 #define DIOCSETIFFLAG	_IOWR('D', 89, struct pfioc_iface)
 #define DIOCCLRIFFLAG	_IOWR('D', 90, struct pfioc_iface)
 #define DIOCKILLSRCNODES	_IOWR('D', 91, struct pfioc_src_node_kill)
diff --git a/sys/net/tap/if_tap.c b/sys/net/tap/if_tap.c
index 5fb75258cc..00ce4e7d95 100644
--- a/sys/net/tap/if_tap.c
+++ b/sys/net/tap/if_tap.c
@@ -797,8 +797,7 @@ tapioctl(struct dev_ioctl_args *ap)
 		ifp->if_flags = f | (ifp->if_flags & IFF_CANTCHANGE);
 		break;
 
-	case OSIOCGIFADDR:	/* get MAC address of the remote side */
-	case SIOCGIFADDR:
+	case SIOCGIFADDR:	/* get MAC address of the remote side */
 		bcopy(tp->ether_addr, data, sizeof(tp->ether_addr));
 		break;
 
diff --git a/sys/net/tap/if_tap.h b/sys/net/tap/if_tap.h
index 745119b37c..c3bdf718fd 100644
--- a/sys/net/tap/if_tap.h
+++ b/sys/net/tap/if_tap.h
@@ -32,7 +32,6 @@
 
 /*
  * $FreeBSD: src/sys/net/if_tap.h,v 1.1.2.1 2000/07/27 13:57:05 nsayer Exp $
- * $DragonFly: src/sys/net/tap/if_tap.h,v 1.2 2003/06/17 04:28:48 dillon Exp $
  * $Id: if_tap.h,v 0.7 2000/07/12 04:12:51 max Exp $
  */
 
@@ -61,16 +60,17 @@ struct tapinfo {
 
 /* VMware ioctl's */
 #define VMIO_SIOCSIFFLAGS	_IO('V', 0)
+#if 0 /* unimplemented */
 #define VMIO_SIOCSKEEP		_IO('V', 1)
 #define VMIO_SIOCSIFBR		_IO('V', 2)
 #define VMIO_SIOCSLADRF		_IO('V', 3)
 
-/* XXX -- unimplemented */
 #define VMIO_SIOCSETMACADDR	_IO('V', 4)
 
 /* XXX -- not used? */
 #define VMIO_SIOCPORT		_IO('V', 5)
 #define VMIO_SIOCBRIDGE		_IO('V', 6)
 #define VMIO_SIOCNETIF		_IO('V', 7)
+#endif
 
 #endif /* !_NET_IF_TAP_H_ */
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index 27c56c0852..4102a10ab1 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -264,7 +264,9 @@ struct typelist {
  */
 
 #define NGIOCGINFO	_IOR('N', 40, struct nodeinfo)	/* get node info */
+#if 0 /* unimplemented */
 #define NGIOCSETNAME	_IOW('N', 41, struct ngm_name)	/* set node name */
+#endif
 
 #ifdef _KERNEL
 /*
diff --git a/sys/netgraph7/ng_message.h b/sys/netgraph7/ng_message.h
index 253cedb3bd..a40851d14f 100644
--- a/sys/netgraph7/ng_message.h
+++ b/sys/netgraph7/ng_message.h
@@ -38,7 +38,6 @@
  * Author: Julian Elischer <julian@freebsd.org>
  *
  * $FreeBSD: src/sys/netgraph/ng_message.h,v 1.29 2006/10/17 11:01:20 glebius Exp $
- * $DragonFly: src/sys/netgraph7/ng_message.h,v 1.2 2008/06/26 23:05:35 dillon Exp $
  * $Whistle: ng_message.h,v 1.12 1999/01/25 01:17:44 archie Exp $
  */
 
@@ -380,7 +379,9 @@ struct flow_manager {
  */
 
 #define NGIOCGINFO	_IOR('N', 40, struct nodeinfo)	/* get node info */
+#if 0 /* unimplemented */
 #define NGIOCSETNAME	_IOW('N', 41, struct ngm_name)	/* set node name */
+#endif
 
 #ifdef _KERNEL
 /*
diff --git a/sys/platform/pc64/include/ioctl_fd.h b/sys/platform/pc64/include/ioctl_fd.h
index 2312412909..c87f04863b 100644
--- a/sys/platform/pc64/include/ioctl_fd.h
+++ b/sys/platform/pc64/include/ioctl_fd.h
@@ -110,8 +110,6 @@ struct fdc_status {
 #define FD_GOPTS  _IOR('F', 64, int) /* drive options, see below */
 #define FD_SOPTS  _IOW('F', 65, int)
 
-#define FD_DEBUG  _IOW('F', 66, int)
-
 /*
  * Obtain NE765 status registers.  Only successful if there is
  * a valid status stored in fdc->status[].
diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h
index d507bce277..058f884edc 100644
--- a/sys/sys/cdio.h
+++ b/sys/sys/cdio.h
@@ -186,7 +186,9 @@ struct	ioc_vol
 #define	CDIOCSETMONO	_IO('c',12)
 
 #define	CDIOCSETSTEREO	_IO('c',13)
+#if 0 /* XXX maybe remove */
 #define	CDIOCSETSTERIO	CDIOCSETSTEREO
+#endif
 
 #define	CDIOCSETMUTE	_IO('c',14)
 
@@ -232,6 +234,7 @@ struct ioc_play_msf
 #define CDIOCCLOSE	_IO('c',28)	/*<1>*/
 
 
+#if 0 /* unimplemented */
 struct	ioc_pitch		/*<1>For drives that support it, this*/
 {				/*<1>call instructs the drive to play the*/
 	short	speed;		/*<1>audio at a faster or slower-than-normal*/
@@ -284,5 +287,6 @@ struct ioc_read_audio
 };
 
 #define CDIOCREADAUDIO _IOWR('c',31,struct ioc_read_audio)
+#endif
 
 #endif /* !_SYS_CDIO_H_ */
diff --git a/sys/sys/consio.h b/sys/sys/consio.h
index 59d7c7387d..690f3c9002 100644
--- a/sys/sys/consio.h
+++ b/sys/sys/consio.h
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/sys/consio.h,v 1.5.2.7 2002/09/15 22:30:46 dd Exp $
- * $DragonFly: src/sys/sys/consio.h,v 1.6 2007/08/19 11:39:11 swildner Exp $
  */
 
 #ifndef	_SYS_CONSIO_H_
@@ -94,18 +93,6 @@ typedef struct _scrmap	scrmap_t;
 /* set blank time interval */
 #define CONS_BLANKTIME	_IOW('c', 4, int)
 
-/* set/get the screen saver (these ioctls are current noop) */
-struct ssaver	{
-#define MAXSSAVER	16
-	char		name[MAXSSAVER];
-	int		num;
-	long		time;
-};
-typedef struct ssaver	ssaver_t;
-
-#define CONS_SSAVER	_IOW('c', 5, ssaver_t)
-#define CONS_GSAVER	_IOWR('c', 6, ssaver_t)
-
 /* set the text cursor shape */
 #define CONS_BLINK_CURSOR (1 << 0)
 #define CONS_CHAR_CURSOR (1 << 1)
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index 2a54a9f044..e5330fbf99 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -86,6 +86,8 @@ CTASSERT(sizeof (struct dos_partition) == DOSPARTSIZE);
 #define	DPSECT(s) ((s) & 0x3f)		/* isolate relevant bits of sector */
 #define	DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */
 
+#if 0 /* unimplemented */
 #define DIOCSMBR 	_IOW('M', 129, u_char[512])
+#endif
 
 #endif /* !_SYS_DISKMBR_H_ */
diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h
index f3429500c2..dd86e93efc 100644
--- a/sys/sys/sockio.h
+++ b/sys/sys/sockio.h
@@ -28,7 +28,6 @@
  *
  *	@(#)sockio.h	8.1 (Berkeley) 3/28/94
  * $FreeBSD: src/sys/sys/sockio.h,v 1.14.2.6 2002/02/07 15:12:37 ambrisko Exp $
- * $DragonFly: src/sys/sys/sockio.h,v 1.5 2007/09/30 04:37:27 sephe Exp $
  */
 
 #ifndef	_SYS_SOCKIO_H_
@@ -37,10 +36,12 @@
 #include <sys/ioccom.h>
 
 /* Socket ioctl's. */
+#if 0 /* unimplemented */
 #define	SIOCSHIWAT	 _IOW('s',  0, int)		/* set high watermark */
 #define	SIOCGHIWAT	 _IOR('s',  1, int)		/* get high watermark */
 #define	SIOCSLOWAT	 _IOW('s',  2, int)		/* set low watermark */
 #define	SIOCGLOWAT	 _IOR('s',  3, int)		/* get low watermark */
+#endif
 #define	SIOCATMARK	 _IOR('s',  7, int)		/* at oob mark? */
 #define	SIOCSPGRP	 _IOW('s',  8, int)		/* set process group */
 #define	SIOCGPGRP	 _IOR('s',  9, int)		/* get process group */
@@ -49,19 +50,14 @@
 #define	SIOCGETSGCNT	_IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
 
 #define	SIOCSIFADDR	 _IOW('i', 12, struct ifreq)	/* set ifnet address */
-#define	OSIOCGIFADDR	_IOWR('i', 13, struct ifreq)	/* get ifnet address */
 #define	SIOCGIFADDR	_IOWR('i', 33, struct ifreq)	/* get ifnet address */
 #define	SIOCSIFDSTADDR	 _IOW('i', 14, struct ifreq)	/* set p-p address */
-#define	OSIOCGIFDSTADDR	_IOWR('i', 15, struct ifreq)	/* get p-p address */
 #define	SIOCGIFDSTADDR	_IOWR('i', 34, struct ifreq)	/* get p-p address */
 #define	SIOCSIFFLAGS	 _IOW('i', 16, struct ifreq)	/* set ifnet flags */
 #define	SIOCGIFFLAGS	_IOWR('i', 17, struct ifreq)	/* get ifnet flags */
-#define	OSIOCGIFBRDADDR	_IOWR('i', 18, struct ifreq)	/* get broadcast addr */
 #define	SIOCGIFBRDADDR	_IOWR('i', 35, struct ifreq)	/* get broadcast addr */
 #define	SIOCSIFBRDADDR	 _IOW('i', 19, struct ifreq)	/* set broadcast addr */
-#define	OSIOCGIFCONF	_IOWR('i', 20, struct ifconf)	/* get ifnet list */
 #define	SIOCGIFCONF	_IOWR('i', 36, struct ifconf)	/* get ifnet list */
-#define	OSIOCGIFNETMASK	_IOWR('i', 21, struct ifreq)	/* get net addr mask */
 #define	SIOCGIFNETMASK	_IOWR('i', 37, struct ifreq)	/* get net addr mask */
 #define	SIOCSIFNETMASK	 _IOW('i', 22, struct ifreq)	/* set net addr mask */
 #define	SIOCGIFMETRIC	_IOWR('i', 23, struct ifreq)	/* get IF metric */
@@ -106,7 +102,9 @@
 #define	SIOCGLIFPHYADDR	_IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
 
 #define	SIOCGPRIVATE_0	_IOWR('i', 80, struct ifreq)	/* Linux Private + 0 */
+#if 0 /* unimplemented */
 #define	SIOCGPRIVATE_1	_IOWR('i', 81, struct ifreq)	/* Linux Private + 1 */
+#endif
 
 #define	SIOCSDRVSPEC     _IOW('i', 123, struct ifdrv)   /* set driver-specific
 							   parameters */
@@ -125,6 +123,8 @@
 #define SIOCSIFTSOLEN	 _IOW('i', 127, struct ifreq)	/* set max TSO len */
 #define SIOCGIFTSOLEN	_IOWR('i', 128, struct ifreq)	/* get max TSO len */
 
+#if 1 /* unimplemented, yet used */
 #define	SIOCGIFGMEMB	_IOWR('i', 138, struct ifgroupreq) /* get members */
+#endif
 
 #endif /* !_SYS_SOCKIO_H_ */
diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h
index bf1af8c457..64b8014b07 100644
--- a/sys/sys/soundcard.h
+++ b/sys/sys/soundcard.h
@@ -759,17 +759,21 @@ struct midi_info {
 /*
  * ioctl commands for the /dev/midi##
  */
+#if 0 /* unimplemented */
 typedef struct {
 	u_char cmd;
 	char nr_args, nr_returns;
 	u_char data[30];
 } mpu_command_rec;
+#endif
 
 #define SNDCTL_MIDI_PRETIME	_IOWR('m', 0, int)
+#if 0 /* unimplemented */
 #define SNDCTL_MIDI_MPUMODE	_IOWR('m', 1, int)
 #define SNDCTL_MIDI_MPUCMD	_IOWR('m', 2, mpu_command_rec)
 #define MIOSPASSTHRU		_IOWR('m', 3, int)
 #define MIOGPASSTHRU		_IOWR('m', 4, int)
+#endif
 
 /*
  * IOCTL commands for /dev/dsp and /dev/audio
@@ -951,6 +955,7 @@ typedef struct buffmem_desc {
 #define SOUND_PCM_READ_BITS	_IOR ('P', 5, int)
 #define SOUND_PCM_READ_FILTER	_IOR ('P', 7, int)
 
+#if 0 /* unimplemented */
 /*
  * ioctl calls to be used in communication with coprocessors and
  * DSP chips.
@@ -991,6 +996,7 @@ typedef struct copr_msg {
 #define SNDCTL_COPR_HALT	_IOWR('C',  7, copr_debug_buf)
 #define SNDCTL_COPR_SENDMSG	_IOW ('C',  8, copr_msg)
 #define SNDCTL_COPR_RCVMSG	_IOR ('C',  9, copr_msg)
+#endif
 
 /*
  * IOCTL commands for /dev/mixer
@@ -1051,9 +1057,11 @@ typedef struct copr_msg {
  */
 #define SOUND_ONOFF_MIN		28
 #define SOUND_ONOFF_MAX		30
+#if 0 /* unimplemented */
 #define SOUND_MIXER_MUTE	28	/* 0 or 1 */
 #define SOUND_MIXER_ENHANCE	29	/* Enhanced stereo (0, 40, 60 or 80) */
 #define SOUND_MIXER_LOUD	30	/* 0 or 1 */
+#endif
 
 /* Note!	Number 31 cannot be used since the sign bit is reserved */
 #define SOUND_MIXER_NONE        31
@@ -1108,9 +1116,11 @@ typedef struct copr_msg {
 #define SOUND_MASK_MONITOR      (1 << SOUND_MIXER_MONITOR)
 
 /* Obsolete macros */
+#if 0 /* unimplemented */
 #define SOUND_MASK_MUTE		(1 << SOUND_MIXER_MUTE)
 #define SOUND_MASK_ENHANCE	(1 << SOUND_MIXER_ENHANCE)
 #define SOUND_MASK_LOUD		(1 << SOUND_MIXER_LOUD)
+#endif
 
 #define MIXER_READ(dev)		_IOR('M', dev, int)
 #define SOUND_MIXER_READ_VOLUME		MIXER_READ(SOUND_MIXER_VOLUME)
@@ -1140,9 +1150,11 @@ typedef struct copr_msg {
 #define SOUND_MIXER_READ_MONITOR	MIXER_READ(SOUND_MIXER_MONITOR)
 
 /* Obsolete macros */
+#if 0 /* unimplemented */
 #define SOUND_MIXER_READ_MUTE		MIXER_READ(SOUND_MIXER_MUTE)
 #define SOUND_MIXER_READ_ENHANCE	MIXER_READ(SOUND_MIXER_ENHANCE)
 #define SOUND_MIXER_READ_LOUD		MIXER_READ(SOUND_MIXER_LOUD)
+#endif
 
 #define SOUND_MIXER_READ_RECSRC		MIXER_READ(SOUND_MIXER_RECSRC)
 #define SOUND_MIXER_READ_DEVMASK	MIXER_READ(SOUND_MIXER_DEVMASK)
@@ -1177,9 +1189,11 @@ typedef struct copr_msg {
 #define SOUND_MIXER_WRITE_VIDEO		MIXER_WRITE(SOUND_MIXER_VIDEO)
 #define SOUND_MIXER_WRITE_MONITOR	MIXER_WRITE(SOUND_MIXER_MONITOR)
 
+#if 0 /* unimplemented */
 #define SOUND_MIXER_WRITE_MUTE		MIXER_WRITE(SOUND_MIXER_MUTE)
 #define SOUND_MIXER_WRITE_ENHANCE	MIXER_WRITE(SOUND_MIXER_ENHANCE)
 #define SOUND_MIXER_WRITE_LOUD		MIXER_WRITE(SOUND_MIXER_LOUD)
+#endif
 
 #define SOUND_MIXER_WRITE_RECSRC	MIXER_WRITE(SOUND_MIXER_RECSRC)
 
@@ -1762,6 +1776,7 @@ typedef struct oss_sysinfo
 	int	filler[172];	/* For future expansion (set to -1) */
 } oss_sysinfo;
 
+#if 0 /* unimplemented */
 typedef struct oss_mixext
 {
   int dev;			/* Mixer device number */
@@ -1846,6 +1861,7 @@ typedef struct oss_mixer_value
   int timestamp;		/* Must be set to oss_mixext.timestamp */
   int filler[8];		/* Reserved for future use. Initialize to 0 */
 } oss_mixer_value;
+#endif
 
 #define OSS_ENUM_MAXVALUE       255
 typedef struct oss_mixer_enuminfo
@@ -1932,6 +1948,7 @@ typedef struct oss_mixerinfo
   int filler[254];		/* Reserved */
 } oss_mixerinfo;
 
+#if 0 /* unimplemented */
 typedef struct oss_midi_info
 {
   int dev;			/* Midi device number */
@@ -1963,6 +1980,7 @@ typedef struct oss_midi_info
   int latency;			/* In usecs, -1=unknown */
   int filler[244];
 } oss_midi_info;
+#endif
 
 typedef struct oss_card_info
 {
@@ -1978,15 +1996,19 @@ typedef struct oss_card_info
 #define SNDCTL_SYSINFO          _IOR ('X', 1, oss_sysinfo)
 #define OSS_SYSINFO             SNDCTL_SYSINFO /* Old name */
 
+#if 0 /* unimplemented */
 #define SNDCTL_MIX_NRMIX	_IOR ('X', 2, int)
 #define SNDCTL_MIX_NREXT	_IOWR('X', 3, int)
 #define SNDCTL_MIX_EXTINFO	_IOWR('X', 4, oss_mixext)
 #define SNDCTL_MIX_READ		_IOWR('X', 5, oss_mixer_value)
 #define SNDCTL_MIX_WRITE	_IOWR('X', 6, oss_mixer_value)
+#endif
 
 #define SNDCTL_AUDIOINFO	_IOWR('X', 7, oss_audioinfo)
+#if 0 /* unimplemented */
 #define SNDCTL_MIX_ENUMINFO	_IOWR('X', 8, oss_mixer_enuminfo)
 #define SNDCTL_MIDIINFO		_IOWR('X', 9, oss_midi_info)
+#endif
 #define SNDCTL_MIXERINFO	_IOWR('X',10, oss_mixerinfo)
 #define SNDCTL_CARDINFO		_IOWR('X',11, oss_card_info)
 #define SNDCTL_ENGINEINFO	_IOWR('X',12, oss_audioinfo)
diff --git a/sys/sys/ttycom.h b/sys/sys/ttycom.h
index 5940fb9387..057bd77f25 100644
--- a/sys/sys/ttycom.h
+++ b/sys/sys/ttycom.h
@@ -33,7 +33,6 @@
  *
  *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94
  * $FreeBSD: src/sys/sys/ttycom.h,v 1.16 2000/01/29 16:47:35 peter Exp $
- * $DragonFly: src/sys/sys/ttycom.h,v 1.3 2007/12/30 20:02:57 hasso Exp $
  */
 
 #ifndef	_SYS_TTYCOM_H_
@@ -57,6 +56,7 @@ struct winsize {
 	unsigned short	ws_ypixel;	/* vertical size, pixels */
 };
 
+#if 1 /* XXX unimplemented ioctls; clean up sys/dev/serial for TIOCM_* usage */
 #define	TIOCMODG	_IOR('t', 3, int)	/* get modem control state */
 #define	TIOCMODS	_IOW('t', 4, int)	/* set modem control state */
 #define		TIOCM_LE	0001		/* line enable */
@@ -70,7 +70,12 @@ struct winsize {
 #define		TIOCM_RNG	0200		/* ring */
 #define		TIOCM_RI	TIOCM_RNG
 #define		TIOCM_DSR	0400		/* data set ready */
+#else
+						/* 0-2 compat */
+						/* 3-7 unused */
 						/* 8-10 compat */
+						/* 11-12 unused */
+#endif
 #define	TIOCEXCL	 _IO('t', 13)		/* set exclusive use of tty */
 #define	TIOCNXCL	 _IO('t', 14)		/* reset exclusive use of tty */
 						/* 15 unused */
diff --git a/usr.sbin/fdcontrol/fdcontrol.8 b/usr.sbin/fdcontrol/fdcontrol.8
index ede596ff55..ddcaa7ea2b 100644
--- a/usr.sbin/fdcontrol/fdcontrol.8
+++ b/usr.sbin/fdcontrol/fdcontrol.8
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD: src/usr.sbin/fdcontrol/fdcontrol.8,v 1.9.2.4 2002/06/21 16:40:24 charnier Exp $
 .\"
-.Dd May 22, 1994
+.Dd May 28, 2018
 .Dt FDCONTROL 8
 .Os
 .Sh NAME
@@ -34,9 +34,6 @@
 .Nd modify floppy disk parameters
 .Sh SYNOPSIS
 .Nm
-.Op Fl d Ar 0|1
-.Ar device
-.Nm
 .Op Fl s
 .Ar device
 .Sh DESCRIPTION
@@ -53,12 +50,7 @@ The
 utility currently supports the specification of device parameters for the
 floppy disk drive
 .Fl ( s ,
-also default mode),
-or it allows the modification of the driver debug level, in case the
-floppy driver has been compiled into the kernel with the
-.Em DEBUG
-option set
-.Pq Fl d .
+also default mode).
 .Pp
 Since the implications of such actions are considered harmful, the
 underlying
@@ -82,7 +74,7 @@ facility.
 The
 .Nm
 utility is currently under development.
-It's user interface and overall
+Its user interface and overall
 functionality are subjects to future improvements and changes.
 .Sh AUTHORS
 The program has been contributed by
@@ -92,12 +84,6 @@ Dresden.
 The
 .Nm
 utility is currently under development.
-It's user interface is rather
+Its user interface is rather
 silly and likely to change in future, options should be provided to
 allow anything being modified from the command line.
-.Pp
-The driver does actually support only two debug levels
-(0 and 1),
-where debug level 1 will generate huge amounts of output.
-It is likely
-to overflow the syslog if not used with extreme care.
diff --git a/usr.sbin/fdcontrol/fdcontrol.c b/usr.sbin/fdcontrol/fdcontrol.c
index fccce5a5d1..e2691ad14a 100644
--- a/usr.sbin/fdcontrol/fdcontrol.c
+++ b/usr.sbin/fdcontrol/fdcontrol.c
@@ -50,7 +50,7 @@ getnumber(void)
 __dead2 static void
 usage(void)
 {
-  fprintf(stderr, "usage: fdcontrol [-d 0|1] | [-s] device-node\n");
+  fprintf(stderr, "usage: fdcontrol [-s] device-node\n");
   exit(2);
 }
 
@@ -64,18 +64,12 @@ main(int argc, char **argv)
 {
   struct fd_type ft;
   int fd, i;
-  int debug = -1, settype = 1;
+  int settype = 1;
 
-  while((i = getopt(argc, argv, "d:s")) != -1)
+  while((i = getopt(argc, argv, "s")) != -1)
     switch(i)
       {
-      case 'd':
-	debug = atoi(optarg);
-	settype = 0;
-	break;
-
       case 's':
-	debug = -1;
 	settype = 1;
 	break;
 
@@ -96,16 +90,6 @@ main(int argc, char **argv)
       return 1;
     }
 
-  if(debug != -1)
-    {
-      if(ioctl(fd, FD_DEBUG, &debug) < 0)
-	{
-	  warn("ioctl(FD_DEBUG)");
-	  return 1;
-	}
-      return 0;
-    }
-
   if(settype)
     {
       if(ioctl(fd, FD_GTYPE, &ft) < 0)
-- 
2.17.0

