mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Introduce a symbol for the GEOM class name instead of using the ad-hoc string
constant.
This commit is contained in:
parent
b64478a137
commit
252c094e53
3 changed files with 5 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ static g_dumpconf_t g_disk_dumpconf;
|
|||
static g_provgone_t g_disk_providergone;
|
||||
|
||||
static struct g_class g_disk_class = {
|
||||
.name = "DISK",
|
||||
.name = G_DISK_CLASS_NAME,
|
||||
.version = G_VERSION,
|
||||
.start = g_disk_start,
|
||||
.access = g_disk_access,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
#include <sys/_mutex.h>
|
||||
#include <sys/disk.h>
|
||||
|
||||
#define G_DISK_CLASS_NAME "DISK"
|
||||
|
||||
struct disk;
|
||||
|
||||
typedef int disk_open_t(struct disk *);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
#include <geom/geom.h>
|
||||
#include <geom/geom_int.h>
|
||||
#include <geom/geom_disk.h>
|
||||
|
||||
|
||||
static void
|
||||
|
|
@ -146,7 +147,7 @@ g_conftxt(void *p, int flag)
|
|||
sb = p;
|
||||
g_topology_assert();
|
||||
LIST_FOREACH(mp, &g_classes, class) {
|
||||
if (!strcmp(mp->name, "DISK") || !strcmp(mp->name, "MD"))
|
||||
if (!strcmp(mp->name, G_DISK_CLASS_NAME) || !strcmp(mp->name, "MD"))
|
||||
g_conftxt_class(sb, mp);
|
||||
}
|
||||
sbuf_finish(sb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue