Premptively change initializations of struct g_class to use C99
sparse struct initializations before we extend the struct with new OAM related member functions.
This commit is contained in:
parent
b7b5ae3edb
commit
c138fec0b5
@ -271,9 +271,8 @@ g_bde_config(struct g_configargs *ga)
|
||||
}
|
||||
|
||||
static struct g_class g_bde_class = {
|
||||
BDE_CLASS_NAME,
|
||||
NULL,
|
||||
g_bde_config,
|
||||
.name = BDE_CLASS_NAME,
|
||||
.config = g_bde_config,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -100,7 +100,11 @@ struct g_class {
|
||||
u_int protect;
|
||||
};
|
||||
|
||||
#define G_CLASS_INITIALIZER { 0, 0 }, { 0 }, 0, 0
|
||||
#define G_CLASS_INITIALIZER \
|
||||
.class = { 0, 0 }, \
|
||||
.geom = { 0 }, \
|
||||
.event = 0, \
|
||||
.protect = 0
|
||||
|
||||
/*
|
||||
* The g_geom is an instance of a g_class.
|
||||
|
@ -383,9 +383,8 @@ g_aes_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
|
||||
}
|
||||
|
||||
static struct g_class g_aes_class = {
|
||||
AES_CLASS_NAME,
|
||||
g_aes_taste,
|
||||
NULL,
|
||||
.name = AES_CLASS_NAME,
|
||||
.taste = g_aes_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -273,9 +273,8 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
||||
|
||||
|
||||
static struct g_class g_apple_class = {
|
||||
APPLE_CLASS_NAME,
|
||||
g_apple_taste,
|
||||
NULL,
|
||||
.name = APPLE_CLASS_NAME,
|
||||
.taste = g_apple_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -928,9 +928,8 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
||||
|
||||
/* Finally, register with GEOM infrastructure. */
|
||||
static struct g_class g_bsd_class = {
|
||||
BSD_CLASS_NAME,
|
||||
g_bsd_taste,
|
||||
NULL,
|
||||
.name = BSD_CLASS_NAME,
|
||||
.taste = g_bsd_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -72,9 +72,8 @@ static g_taste_t g_dev_taste;
|
||||
static g_orphan_t g_dev_orphan;
|
||||
|
||||
static struct g_class g_dev_class = {
|
||||
"DEV",
|
||||
g_dev_taste,
|
||||
NULL,
|
||||
.name = "DEV",
|
||||
.taste = g_dev_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -60,9 +60,7 @@ static struct mtx g_disk_done_mtx;
|
||||
static g_access_t g_disk_access;
|
||||
|
||||
struct g_class g_disk_class = {
|
||||
"DISK",
|
||||
NULL,
|
||||
NULL,
|
||||
.name = "DISK",
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -253,9 +253,8 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
||||
}
|
||||
|
||||
static struct g_class g_gpt_class = {
|
||||
"GPT",
|
||||
g_gpt_taste,
|
||||
NULL,
|
||||
.name = "GPT",
|
||||
.taste = g_gpt_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -331,9 +331,8 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
|
||||
}
|
||||
|
||||
static struct g_class g_mbr_class = {
|
||||
MBR_CLASS_NAME,
|
||||
g_mbr_taste,
|
||||
NULL,
|
||||
.name = MBR_CLASS_NAME,
|
||||
.taste = g_mbr_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -241,9 +241,8 @@ g_mirror_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
|
||||
#define MIRROR_CLASS_NAME "MIRROR"
|
||||
|
||||
static struct g_class g_mirror_class = {
|
||||
MIRROR_CLASS_NAME,
|
||||
g_mirror_taste,
|
||||
NULL,
|
||||
.name = MIRROR_CLASS_NAME,
|
||||
.taste = g_mirror_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -342,9 +342,8 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
||||
}
|
||||
|
||||
static struct g_class g_pc98_class = {
|
||||
PC98_CLASS_NAME,
|
||||
g_pc98_taste,
|
||||
NULL,
|
||||
.name = PC98_CLASS_NAME,
|
||||
.taste = g_pc98_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -221,9 +221,8 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
||||
}
|
||||
|
||||
static struct g_class g_sunlabel_class = {
|
||||
SUNLABEL_CLASS_NAME,
|
||||
g_sunlabel_taste,
|
||||
NULL,
|
||||
.name = SUNLABEL_CLASS_NAME,
|
||||
.taste = g_sunlabel_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
@ -144,9 +144,8 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider *pp, int flags)
|
||||
}
|
||||
|
||||
static struct g_class g_vol_ffs_class = {
|
||||
VOL_FFS_CLASS_NAME,
|
||||
g_vol_ffs_taste,
|
||||
NULL,
|
||||
.name = VOL_FFS_CLASS_NAME,
|
||||
.taste = g_vol_ffs_taste,
|
||||
G_CLASS_INITIALIZER
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user