aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom.h8
-rw-r--r--sys/geom/geom_aes.c8
-rw-r--r--sys/geom/geom_apple.c9
-rw-r--r--sys/geom/geom_bsd.c8
-rw-r--r--sys/geom/geom_dump.c11
-rw-r--r--sys/geom/geom_event.c13
-rw-r--r--sys/geom/geom_gpt.c9
-rw-r--r--sys/geom/geom_io.c9
-rw-r--r--sys/geom/geom_mbr.c9
-rw-r--r--sys/geom/geom_mirror.c8
-rw-r--r--sys/geom/geom_pc98.c8
-rw-r--r--sys/geom/geom_slice.c11
-rw-r--r--sys/geom/geom_subr.c11
-rw-r--r--sys/geom/geom_sunlabel.c9
-rw-r--r--sys/geom/geom_vol_ffs.c9
15 files changed, 0 insertions, 140 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 9850855f9b41..90b7d6043566 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -45,14 +45,6 @@
#include <sys/ioccom.h>
#include <sys/sbuf.h>
-#ifdef KERNELSIM
-/*
- * The GEOM subsystem makes a few concessions in order to be able to run as a
- * user-land simulation as well as a kernel component.
- */
-#include <geom_sim.h>
-#endif
-
struct g_class;
struct g_geom;
struct g_consumer;
diff --git a/sys/geom/geom_aes.c b/sys/geom/geom_aes.c
index 6862e989dbc5..b79231d21de6 100644
--- a/sys/geom/geom_aes.c
+++ b/sys/geom/geom_aes.c
@@ -41,13 +41,6 @@
*/
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
@@ -56,7 +49,6 @@
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/libkern.h>
-#endif
#include <sys/endian.h>
#include <sys/md5.h>
#include <sys/errno.h>
diff --git a/sys/geom/geom_apple.c b/sys/geom/geom_apple.c
index c0cbc5926ffc..503a52082a8f 100644
--- a/sys/geom/geom_apple.c
+++ b/sys/geom/geom_apple.c
@@ -35,21 +35,12 @@
#include <sys/param.h>
#include <sys/endian.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/sbuf.h>
#include <geom/geom.h>
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index afef3012db0d..d50a04046963 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -41,13 +41,6 @@
#include <sys/param.h>
#include <sys/endian.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
@@ -55,7 +48,6 @@
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/md5.h>
#include <sys/errno.h>
#include <sys/disklabel.h>
diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c
index 6d2a3debdd14..3f064b3334c3 100644
--- a/sys/geom/geom_dump.c
+++ b/sys/geom/geom_dump.c
@@ -38,16 +38,8 @@
#include <sys/param.h>
#include <sys/sbuf.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/malloc.h>
-#endif
#include <machine/stdarg.h>
#include <geom/geom.h>
@@ -252,9 +244,6 @@ g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g
g_topology_assert();
sbuf_printf(sb, "<mesh>\n");
-#ifndef _KERNEL
- sbuf_printf(sb, " <FreeBSD>%cFreeBSD%c</FreeBSD>\n", '$', '$');
-#endif
LIST_FOREACH(mp2, &g_classes, class) {
if (mp != NULL && mp != mp2)
continue;
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index c6e95f408fa8..41d9ab574bcf 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -41,14 +41,6 @@
*/
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <err.h>
-#else
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -56,7 +48,6 @@
#include <sys/mutex.h>
#include <sys/eventhandler.h>
#include <machine/stdarg.h>
-#endif
#include <sys/errno.h>
#include <sys/time.h>
#include <geom/geom.h>
@@ -357,24 +348,20 @@ g_call_me(g_call_me_t *func, void *arg, ...)
return (0);
}
-#ifdef _KERNEL
static void
geom_shutdown(void *foo __unused)
{
g_shutdown = 1;
}
-#endif
void
g_event_init()
{
-#ifdef _KERNEL
EVENTHANDLER_REGISTER(shutdown_pre_sync, geom_shutdown, NULL,
SHUTDOWN_PRI_FIRST);
-#endif
mtx_init(&g_eventlock, "GEOM orphanage", NULL, MTX_DEF);
sx_init(&g_eventstall, "GEOM event stalling");
}
diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c
index 764e47c7b3b0..05591a265554 100644
--- a/sys/geom/geom_gpt.c
+++ b/sys/geom/geom_gpt.c
@@ -32,21 +32,12 @@
*/
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/endian.h>
#include <sys/sbuf.h>
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index b99ee4d9731d..e325ecd98d3a 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -37,19 +37,10 @@
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <err.h>
-#include <sched.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
-#endif
#include <sys/errno.h>
#include <geom/geom.h>
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 2663f3e56269..d2af8ab70892 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -35,21 +35,12 @@
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/endian.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/diskmbr.h>
#include <sys/sbuf.h>
diff --git a/sys/geom/geom_mirror.c b/sys/geom/geom_mirror.c
index 0e72b1ec1d85..7e1b4e77a81f 100644
--- a/sys/geom/geom_mirror.c
+++ b/sys/geom/geom_mirror.c
@@ -31,13 +31,6 @@
*/
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
@@ -46,7 +39,6 @@
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/libkern.h>
-#endif
#include <sys/endian.h>
#include <sys/md5.h>
#include <sys/errno.h>
diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c
index c6ea40451fb3..1cb66d139bff 100644
--- a/sys/geom/geom_pc98.c
+++ b/sys/geom/geom_pc98.c
@@ -34,20 +34,12 @@
#include <sys/param.h>
#include <sys/endian.h>
-#ifndef _KERNEL
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/diskpc98.h>
#include <geom/geom.h>
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c
index 882ddb0bb4fb..878e93d3435a 100644
--- a/sys/geom/geom_slice.c
+++ b/sys/geom/geom_slice.c
@@ -37,14 +37,6 @@
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -54,7 +46,6 @@
#include <sys/kthread.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/errno.h>
#include <sys/sbuf.h>
#include <geom/geom.h>
@@ -220,7 +211,6 @@ g_slice_start(struct bio *bp)
/* Give the real method a chance to override */
if (gsp->start(bp))
return;
-#ifdef _KERNEL
if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
struct g_kerneldump *gkd;
@@ -230,7 +220,6 @@ g_slice_start(struct bio *bp)
gkd->length = gsp->slices[idx].length;
/* now, pass it on downwards... */
}
-#endif
bp2 = g_clone_bio(bp);
if (bp2 == NULL) {
g_io_deliver(bp, ENOMEM);
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index fbaa6c734d6f..a74cadb63551 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -37,14 +37,6 @@
#include <sys/param.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/devicestat.h>
#include <sys/kernel.h>
@@ -55,7 +47,6 @@
#include <sys/kthread.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <sys/errno.h>
#include <sys/sbuf.h>
#include <geom/geom.h>
@@ -619,7 +610,6 @@ g_sanity(void *ptr)
}
}
-#ifdef _KERNEL
struct g_class *
g_idclass(struct geomidorname *p)
{
@@ -703,4 +693,3 @@ g_idprovider(struct geomidorname *p)
g_free(n);
return (NULL);
}
-#endif /* _KERNEL */
diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c
index 5ceebc8f5b49..8c2d5ac032e4 100644
--- a/sys/geom/geom_sunlabel.c
+++ b/sys/geom/geom_sunlabel.c
@@ -38,14 +38,6 @@
#include <sys/param.h>
#include <sys/endian.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/errno.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
@@ -53,7 +45,6 @@
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <geom/geom.h>
#include <geom/geom_slice.h>
#include <machine/endian.h>
diff --git a/sys/geom/geom_vol_ffs.c b/sys/geom/geom_vol_ffs.c
index 9b320fb13f78..a01af4dc7af5 100644
--- a/sys/geom/geom_vol_ffs.c
+++ b/sys/geom/geom_vol_ffs.c
@@ -28,21 +28,12 @@
#include <sys/param.h>
#include <sys/errno.h>
-#ifndef _KERNEL
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <err.h>
-#else
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#endif
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>