geom_subr.c (4c0a424c675f6e85c6a0c05b350fbefb4f206faa) | geom_subr.c (2654e1fc4e36acb05b62f4dd9b8fb32cc5521034) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 47 unchanged lines hidden (view full) --- 56#include <sys/mutex.h> 57#endif 58#include <sys/errno.h> 59#include <sys/sbuf.h> 60#include <geom/geom.h> 61#include <geom/geom_int.h> 62#include <machine/stdarg.h> 63 | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 47 unchanged lines hidden (view full) --- 56#include <sys/mutex.h> 57#endif 58#include <sys/errno.h> 59#include <sys/sbuf.h> 60#include <geom/geom.h> 61#include <geom/geom_int.h> 62#include <machine/stdarg.h> 63 |
64struct class_list_head g_classs = LIST_HEAD_INITIALIZER(g_classs); | 64struct class_list_head g_classes = LIST_HEAD_INITIALIZER(g_classes); |
65static struct g_tailq_head geoms = TAILQ_HEAD_INITIALIZER(geoms); 66static int g_nproviders; 67char *g_wait_event, *g_wait_up, *g_wait_down, *g_wait_sim; 68 69static int g_ignition; 70 71void 72g_add_class(struct g_class *mp) 73{ 74 75 if (!g_ignition) { 76 g_ignition++; 77 g_init(); 78 } 79 g_topology_lock(); 80 g_trace(G_T_TOPOLOGY, "g_add_class(%s)", mp->name); 81 LIST_INIT(&mp->geom); | 65static struct g_tailq_head geoms = TAILQ_HEAD_INITIALIZER(geoms); 66static int g_nproviders; 67char *g_wait_event, *g_wait_up, *g_wait_down, *g_wait_sim; 68 69static int g_ignition; 70 71void 72g_add_class(struct g_class *mp) 73{ 74 75 if (!g_ignition) { 76 g_ignition++; 77 g_init(); 78 } 79 g_topology_lock(); 80 g_trace(G_T_TOPOLOGY, "g_add_class(%s)", mp->name); 81 LIST_INIT(&mp->geom); |
82 LIST_INSERT_HEAD(&g_classs, mp, class); | 82 LIST_INSERT_HEAD(&g_classes, mp, class); |
83 if (g_nproviders > 0) 84 g_post_event(EV_NEW_CLASS, mp, NULL, NULL, NULL); 85 g_topology_unlock(); 86} 87 88struct g_geom * 89g_new_geomf(struct g_class *mp, char *fmt, ...) 90{ --- 462 unchanged lines hidden (view full) --- 553 554static struct g_class * 555g_class_by_name(char *name) 556{ 557 struct g_class *mp; 558 559 g_trace(G_T_TOPOLOGY, "g_class_by_name(%s)", name); 560 g_topology_assert(); | 83 if (g_nproviders > 0) 84 g_post_event(EV_NEW_CLASS, mp, NULL, NULL, NULL); 85 g_topology_unlock(); 86} 87 88struct g_geom * 89g_new_geomf(struct g_class *mp, char *fmt, ...) 90{ --- 462 unchanged lines hidden (view full) --- 553 554static struct g_class * 555g_class_by_name(char *name) 556{ 557 struct g_class *mp; 558 559 g_trace(G_T_TOPOLOGY, "g_class_by_name(%s)", name); 560 g_topology_assert(); |
561 LIST_FOREACH(mp, &g_classs, class) | 561 LIST_FOREACH(mp, &g_classes, class) |
562 if (!strcmp(mp->name, name)) 563 return (mp); 564 return (NULL); 565} 566 567struct g_geom * 568g_create_geomf(char *class, struct g_provider *pp, char *fmt, ...) 569{ --- 72 unchanged lines hidden --- | 562 if (!strcmp(mp->name, name)) 563 return (mp); 564 return (NULL); 565} 566 567struct g_geom * 568g_create_geomf(char *class, struct g_provider *pp, char *fmt, ...) 569{ --- 72 unchanged lines hidden --- |