Module Name: src
Committed By: maxv
Date: Sun Apr 26 09:45:40 UTC 2015
Modified Files:
src/sys/dev: verified_exec.c
Log Message:
Not to add even more confusion in an already overcomplicated subsystem,
remove the FreeBSD code. This code is likely to be outdated, and Veriexec
is in all cases not available on FreeBSD.
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/verified_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/verified_exec.c
diff -u src/sys/dev/verified_exec.c:1.70 src/sys/dev/verified_exec.c:1.71
--- src/sys/dev/verified_exec.c:1.70 Sun Apr 26 09:38:01 2015
+++ src/sys/dev/verified_exec.c Sun Apr 26 09:45:40 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $ */
+/* $NetBSD: verified_exec.c,v 1.71 2015/04/26 09:45:40 maxv Exp $ */
/*-
* Copyright (c) 2005, 2006 Elad Efrat <[email protected]>
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.70 2015/04/26 09:38:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.71 2015/04/26 09:45:40 maxv Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -42,15 +42,9 @@ __KERNEL_RCSID(0, "$NetBSD: verified_exe
#include <sys/syslog.h>
#include <sys/proc.h>
-#ifdef __FreeBSD__
-#include <sys/kernel.h>
-#include <sys/device_port.h>
-#include <sys/ioccom.h>
-#else
#include <sys/ioctl.h>
#include <sys/device.h>
#define DEVPORT_DEVICE struct device
-#endif
#include <prop/proplib.h>
@@ -63,36 +57,19 @@ struct veriexec_softc {
DEVPORT_DEVICE veriexec_dev;
};
-#if defined(__FreeBSD__)
-# define CDEV_MAJOR 216
-# define BDEV_MAJOR -1
-#endif
-
const struct cdevsw veriexec_cdevsw = {
.d_open = veriexecopen,
.d_close = veriexecclose,
.d_read = noread,
.d_write = nowrite,
.d_ioctl = veriexecioctl,
-#ifdef __NetBSD__
.d_stop = nostop,
.d_tty = notty,
-#endif
.d_poll = nopoll,
.d_mmap = nommap,
.d_discard = nodiscard,
-#if defined(__NetBSD__)
.d_kqfilter = nokqfilter,
.d_flag = D_OTHER,
-#elif defined(__FreeBSD__)
- nostrategy,
- "veriexec",
- CDEV_MAJOR,
- nodump,
- nopsize,
- 0, /* flags */
- BDEV_MAJOR
-#endif
};
/* count of number of times device is open (we really only allow one open) */
@@ -291,14 +268,3 @@ veriexecioctl(dev_t dev, u_long cmd, voi
return (error);
}
-#if defined(__FreeBSD__)
-static void
-veriexec_drvinit(void *unused)
-{
- make_dev(&verifiedexec_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
- "veriexec");
- verifiedexecattach(0, 0, 0);
-}
-
-SYSINIT(veriexec, SI_SUB_PSEUDO, SI_ORDER_ANY, veriexec_drvinit, NULL);
-#endif