Lines Matching defs:name
54 * aa_na_name - Find the ns name to display for @view from @curr
59 * Returns: name of @view visible from @curr
63 /* if view == curr then the namespace name isn't displayed */
69 * thus the curr ns.hname is a prefix of its name.
70 * Only output the virtualized portion of the name
82 * @prefix: parent namespace name (MAYBE NULL)
83 * @name: a preallocated name (NOT NULL)
87 static struct aa_ns *alloc_ns(const char *prefix, const char *name)
95 if (!aa_policy_init(&ns->base, prefix, name, GFP_KERNEL))
154 * @name: name of namespace to find (NOT NULL)
155 * @n: length of @name
158 * called @name exists.
162 struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n)
167 ns = aa_get_ns(__aa_findn_ns(&root->sub_ns, name, n));
176 * @name: name of namespace to find (NOT NULL)
179 * called @name exists.
183 struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name)
185 return aa_findn_ns(root, name, strlen(name));
190 * @base: base list to start looking up profile name from (NOT NULL)
191 * @hname: hierarchical ns name (NOT NULL)
198 * Do a relative name lookup, recursing through profile tree.
223 * @name: name of namespace to find (NOT NULL)
224 * @n: length of @name
227 * called @name exists.
231 struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n)
236 ns = aa_get_ns(__aa_lookupn_ns(view, name, n));
242 static struct aa_ns *__aa_create_ns(struct aa_ns *parent, const char *name,
249 AA_BUG(!name);
252 ns = alloc_ns(parent->base.hname, name);
257 error = __aafs_ns_mkdir(ns, ns_subns_dir(parent), name, dir);
260 ns->base.name);
277 * @name: the name of the namespace
282 struct aa_ns *__aa_find_or_create_ns(struct aa_ns *parent, const char *name,
291 ns = aa_get_ns(__aa_find_ns(&parent->sub_ns, name));
293 ns = __aa_create_ns(parent, name, dir);
302 * aa_prepare_ns - find an existing or create a new namespace of @name
304 * @name: the namespace to find or add (NOT NULL)
308 struct aa_ns *aa_prepare_ns(struct aa_ns *parent, const char *name)
315 ns = aa_get_ns(__aa_find_ns(&parent->sub_ns, name));
317 ns = __aa_create_ns(parent, name, NULL);