summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
committerphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
commitdfd1f7fd50fffaf75541921fcf86454cd8eb3614 (patch)
tree624c885995e84df6decddd3291c60a15e50e3c85 /sys/geom
parentcafb94bcea1cdf048e81b7eb2d24808e1a8c5280 (diff)
downloadFreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.zip
FreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.tar.gz
Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/gate/g_gate.c4
-rw-r--r--sys/geom/geom.h3
-rw-r--r--sys/geom/geom_ctl.c4
-rw-r--r--sys/geom/geom_dev.c20
4 files changed, 16 insertions, 15 deletions
diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c
index ce084d6..aae2d0e 100644
--- a/sys/geom/gate/g_gate.c
+++ b/sys/geom/gate/g_gate.c
@@ -63,7 +63,7 @@ struct g_class g_gate_class = {
.destroy_geom = g_gate_destroy_geom
};
-static dev_t status_dev;
+static struct cdev *status_dev;
static d_ioctl_t g_gate_ioctl;
static struct cdevsw g_gate_cdevsw = {
.d_version = D_VERSION,
@@ -437,7 +437,7 @@ g_gate_create(struct g_gate_ctl_create *ggio)
return (EINVAL); \
} while (0)
static int
-g_gate_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
+g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
{
struct g_gate_softc *sc;
struct bio *bp;
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 31002fe..07189bd 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -182,8 +182,9 @@ struct g_provider {
};
/* geom_dev.c */
+struct cdev;
void g_dev_print(void);
-struct g_provider *g_dev_getprovider(dev_t dev);
+struct g_provider *g_dev_getprovider(struct cdev *dev);
/* geom_dump.c */
void g_trace(int level, const char *, ...);
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index 3e50eb3..ce000f3 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -444,7 +444,7 @@ g_ctl_req(void *arg, int flag __unused)
static int
-g_ctl_ioctl_ctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
+g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
struct gctl_req *req;
@@ -479,7 +479,7 @@ g_ctl_ioctl_ctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *t
}
static int
-g_ctl_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
+g_ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
int error;
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 9ad3f70..54f585e 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -99,7 +99,7 @@ g_dev_print(void)
* XXX: eliminating the need for this hack.
*/
static void
-g_dev_clone(void *arg __unused, char *name, int namelen __unused, dev_t *dev)
+g_dev_clone(void *arg __unused, char *name, int namelen __unused, struct cdev **dev)
{
struct g_geom *gp;
@@ -135,7 +135,7 @@ g_dev_register_cloner(void *foo __unused)
SYSINIT(geomdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,g_dev_register_cloner,NULL);
struct g_provider *
-g_dev_getprovider(dev_t dev)
+g_dev_getprovider(struct cdev *dev)
{
struct g_consumer *cp;
@@ -155,7 +155,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
struct g_consumer *cp;
static int unit = GEOM_MINOR_PROVIDERS;
int error;
- dev_t dev;
+ struct cdev *dev;
g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name);
g_topology_assert();
@@ -190,7 +190,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
}
static int
-g_dev_open(dev_t dev, int flags, int fmt, struct thread *td)
+g_dev_open(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct g_geom *gp;
struct g_consumer *cp;
@@ -223,7 +223,7 @@ g_dev_open(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-g_dev_close(dev_t dev, int flags, int fmt, struct thread *td)
+g_dev_close(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct g_geom *gp;
struct g_consumer *cp;
@@ -273,7 +273,7 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td)
* XXX: will break (actually: stall) the BSD disklabel hacks.
*/
static int
-g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
+g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
{
struct g_geom *gp;
struct g_consumer *cp;
@@ -365,7 +365,7 @@ g_dev_strategy(struct bio *bp)
{
struct g_consumer *cp;
struct bio *bp2;
- dev_t dev;
+ struct cdev *dev;
KASSERT(bp->bio_cmd == BIO_READ ||
bp->bio_cmd == BIO_WRITE ||
@@ -404,7 +404,7 @@ g_dev_strategy(struct bio *bp)
*
* Called from below when the provider orphaned us.
* - Clear any dump settings.
- * - Destroy the dev_t to prevent any more request from coming in. The
+ * - Destroy the struct cdev *to prevent any more request from coming in. The
* provider is already marked with an error, so anything which comes in
* in the interrim will be returned immediately.
* - Wait for any outstanding I/O to finish.
@@ -416,7 +416,7 @@ static void
g_dev_orphan(struct g_consumer *cp)
{
struct g_geom *gp;
- dev_t dev;
+ struct cdev *dev;
g_topology_assert();
gp = cp->geom;
@@ -427,7 +427,7 @@ g_dev_orphan(struct g_consumer *cp)
if (dev->si_flags & SI_DUMPDEV)
set_dumper(NULL);
- /* Destroy the dev_t so we get no more requests */
+ /* Destroy the struct cdev *so we get no more requests */
destroy_dev(dev);
/* Wait for the cows to come home */
OpenPOWER on IntegriCloud