summaryrefslogtreecommitdiffstats
path: root/sys/geom/label/g_label_gpt.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-11-28 11:57:43 +0000
committertrasz <trasz@FreeBSD.org>2009-11-28 11:57:43 +0000
commit59762a5f5bfef6149d98565bba635d7810a3c0f7 (patch)
tree5af5a2172663b86e7261fefa106e24cc579c046f /sys/geom/label/g_label_gpt.c
parent369b56492362785761c5ba19d7fbeaa2cc733058 (diff)
downloadFreeBSD-src-59762a5f5bfef6149d98565bba635d7810a3c0f7.zip
FreeBSD-src-59762a5f5bfef6149d98565bba635d7810a3c0f7.tar.gz
Provide a set of sysctls and tunables to disable device node creation
for specific "kinds" of disk labels - for example, GPT UUIDs. Reason for this is that sometimes, other GEOM classes attach to these device nodes instead of the proper ones - e.g. they attach to /dev/gptid/XXX instead of /dev/ada0p2, which is annoying. Reviewed by: pjd (earlier version) MFC after: 1 month
Diffstat (limited to 'sys/geom/label/g_label_gpt.c')
-rw-r--r--sys/geom/label/g_label_gpt.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/geom/label/g_label_gpt.c b/sys/geom/label/g_label_gpt.c
index b186782..3701495 100644
--- a/sys/geom/label/g_label_gpt.c
+++ b/sys/geom/label/g_label_gpt.c
@@ -153,12 +153,17 @@ g_label_gpt_uuid_taste(struct g_consumer *cp, char *label, size_t size)
snprintf_uuid(label, size, &part_gpt_entry->ent.ent_uuid);
}
-const struct g_label_desc g_label_gpt = {
+struct g_label_desc g_label_gpt = {
.ld_taste = g_label_gpt_taste,
- .ld_dir = G_LABEL_GPT_VOLUME_DIR
+ .ld_dir = G_LABEL_GPT_VOLUME_DIR,
+ .ld_enabled = 1
};
-const struct g_label_desc g_label_gpt_uuid = {
+struct g_label_desc g_label_gpt_uuid = {
.ld_taste = g_label_gpt_uuid_taste,
- .ld_dir = G_LABEL_GPT_ID_DIR
+ .ld_dir = G_LABEL_GPT_ID_DIR,
+ .ld_enabled = 1
};
+
+G_LABEL_INIT(gpt, g_label_gpt, "Create device nodes for GPT labels");
+G_LABEL_INIT(gptid, g_label_gpt_uuid, "Create device nodes for GPT UUIDs");
OpenPOWER on IntegriCloud