Deleted Added
full compact
g_label_gpt.c (194433) g_label_gpt.c (199875)
1/*-
2 * Copyright (c) 2008 Marius Nuennerich
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Marius Nuennerich
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/geom/label/g_label_gpt.c 194433 2009-06-18 11:12:11Z ivoras $");
28__FBSDID("$FreeBSD: head/sys/geom/label/g_label_gpt.c 199875 2009-11-28 11:57:43Z trasz $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/malloc.h>
34#include <sys/kobj.h>
35#include <sys/gpt.h>
36

--- 111 unchanged lines hidden (view full) ---

148 /* and only GPT */
149 if (strncmp(tp->gpt_scheme->name, SCHEME_NAME, sizeof(SCHEME_NAME)))
150 return;
151
152 part_gpt_entry = (struct g_part_gpt_entry *)pp->private;
153 snprintf_uuid(label, size, &part_gpt_entry->ent.ent_uuid);
154}
155
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/malloc.h>
34#include <sys/kobj.h>
35#include <sys/gpt.h>
36

--- 111 unchanged lines hidden (view full) ---

148 /* and only GPT */
149 if (strncmp(tp->gpt_scheme->name, SCHEME_NAME, sizeof(SCHEME_NAME)))
150 return;
151
152 part_gpt_entry = (struct g_part_gpt_entry *)pp->private;
153 snprintf_uuid(label, size, &part_gpt_entry->ent.ent_uuid);
154}
155
156const struct g_label_desc g_label_gpt = {
156struct g_label_desc g_label_gpt = {
157 .ld_taste = g_label_gpt_taste,
157 .ld_taste = g_label_gpt_taste,
158 .ld_dir = G_LABEL_GPT_VOLUME_DIR
158 .ld_dir = G_LABEL_GPT_VOLUME_DIR,
159 .ld_enabled = 1
159};
160
160};
161
161const struct g_label_desc g_label_gpt_uuid = {
162struct g_label_desc g_label_gpt_uuid = {
162 .ld_taste = g_label_gpt_uuid_taste,
163 .ld_taste = g_label_gpt_uuid_taste,
163 .ld_dir = G_LABEL_GPT_ID_DIR
164 .ld_dir = G_LABEL_GPT_ID_DIR,
165 .ld_enabled = 1
164};
166};
167
168G_LABEL_INIT(gpt, g_label_gpt, "Create device nodes for GPT labels");
169G_LABEL_INIT(gptid, g_label_gpt_uuid, "Create device nodes for GPT UUIDs");