summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
committerphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
commit0ae911eb0e57eebb61c50c02ddf69aa67ed19599 (patch)
tree4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/geom
parente58d97a666e757e8429a219da05f88a51554c32c (diff)
downloadFreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.zip
FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.tar.gz
Gigacommit to improve device-driver source compatibility between
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_ccd.c18
-rw-r--r--sys/geom/geom_dev.c23
-rw-r--r--sys/geom/geom_stats.c18
3 files changed, 19 insertions, 40 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 4fe4f98..ce4030b 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -115,19 +115,11 @@ static d_ioctl_t ccdctlioctl;
#define CDEV_MAJOR 74
static struct cdevsw ccdctl_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ccdctlioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ccdctl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ccdctlioctl,
+ .d_name = "ccdctl",
+ .d_maj = CDEV_MAJOR,
};
static LIST_HEAD(, ccd_s) ccd_softc_list =
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 7889081..bd855dc 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -59,20 +59,15 @@ static d_strategy_t g_dev_strategy;
static d_ioctl_t g_dev_ioctl;
static struct cdevsw g_dev_cdevsw = {
- /* open */ g_dev_open,
- /* close */ g_dev_close,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ g_dev_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ g_dev_strategy,
- /* name */ "g_dev",
- /* maj */ GEOM_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK | D_TRACKCLOSE,
- /* kqfilter */ nokqfilter
+ .d_open = g_dev_open,
+ .d_close = g_dev_close,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = g_dev_ioctl,
+ .d_strategy = g_dev_strategy,
+ .d_name = "g_dev",
+ .d_maj = GEOM_MAJOR,
+ .d_flags = D_DISK | D_TRACKCLOSE,
};
static g_taste_t g_dev_taste;
diff --git a/sys/geom/geom_stats.c b/sys/geom/geom_stats.c
index 2577b2a..20687d7 100644
--- a/sys/geom/geom_stats.c
+++ b/sys/geom/geom_stats.c
@@ -106,19 +106,11 @@ g_stat_delete(struct g_stat *gsp)
static d_mmap_t g_stat_mmap;
static struct cdevsw geom_stats_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ g_stat_mmap,
- /* strtegy */ nostrategy,
- /* name */ "g_stats",
- /* maj */ GEOM_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_mmap = g_stat_mmap,
+ .d_name = "g_stats",
+ .d_maj = GEOM_MAJOR,
};
static int
OpenPOWER on IntegriCloud