summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-13 09:02:06 +0000
committerphk <phk@FreeBSD.org>2003-04-13 09:02:06 +0000
commit03b1ca36baf4bd8325f619d97a48764fc6dced85 (patch)
tree7e373e1543fdcdee14db44b0c4513544d165797c /sys/geom
parent0f2f76bb732fd63d44ad2f323b86acb6c93a7230 (diff)
downloadFreeBSD-src-03b1ca36baf4bd8325f619d97a48764fc6dced85.zip
FreeBSD-src-03b1ca36baf4bd8325f619d97a48764fc6dced85.tar.gz
Time has run from the "run GEOM in userland" harness, and the new regression
test is built to test GEOM as running in the kernel. This commit is basically "unifdef -D_KERNEL" to remove the mainly #include related code to support the userland-harness.
Diffstat (limited to 'sys/geom')
-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 9850855..90b7d60 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 6862e98..b79231d 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 c0cbc59..503a520 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 afef301..d50a040 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 6d2a3de..3f064b3 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 c6e95f4..41d9ab5 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 764e47c..05591a2 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 b99ee4d..e325ecd 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 2663f3e..d2af8ab 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 0e72b1e..7e1b4e7 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 c6ea404..1cb66d1 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 882ddb0..878e93d 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 fbaa6c7..a74cadb 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 5ceebc8..8c2d5ac 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 9b320fb..a01af4d 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>
OpenPOWER on IntegriCloud