Lines Matching refs:view
33 * aa_ns_visible - test if @view is visible from @curr
35 * @view: namespace to test if visible from @curr (NOT NULL)
36 * @subns: whether view of a subns is allowed
38 * Returns: true if @view is visible from @curr else false
40 bool aa_ns_visible(struct aa_ns *curr, struct aa_ns *view, bool subns)
42 if (curr == view)
48 for ( ; view; view = view->parent) {
49 if (view->parent == curr)
57 * aa_ns_name - Find the ns name to display for @view from @curr
59 * @view: namespace attempting to view (NOT NULL)
62 * Returns: name of @view visible from @curr
64 const char *aa_ns_name(struct aa_ns *curr, struct aa_ns *view, bool subns)
66 /* if view == curr then the namespace name isn't displayed */
67 if (curr == view)
70 if (aa_ns_visible(curr, view, subns)) {
71 /* at this point if a ns is visible it is in a view ns
77 return view->base.hname + strlen(curr->base.hname) + 2;
201 * @view: namespace to search in (NOT NULL)
211 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n)
213 struct aa_ns *ns = view;
232 * aa_lookupn_ns - look up a policy namespace relative to @view
233 * @view: namespace to search in (NOT NULL)
242 struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n)
247 ns = aa_get_ns(__aa_lookupn_ns(view, name, n));