Lines Matching full:view
30 * aa_ns_visible - test if @view is visible from @curr
32 * @view: namespace to test if visible from @curr (NOT NULL)
33 * @subns: whether view of a subns is allowed
35 * Returns: true if @view is visible from @curr else false
37 bool aa_ns_visible(struct aa_ns *curr, struct aa_ns *view, bool subns) in aa_ns_visible() argument
39 if (curr == view) in aa_ns_visible()
45 for ( ; view; view = view->parent) { in aa_ns_visible()
46 if (view->parent == curr) in aa_ns_visible()
54 * aa_na_name - Find the ns name to display for @view from @curr
56 * @view - namespace attempting to view (NOT NULL)
59 * Returns: name of @view visible from @curr
61 const char *aa_ns_name(struct aa_ns *curr, struct aa_ns *view, bool subns) in aa_ns_name() argument
63 /* if view == curr then the namespace name isn't displayed */ in aa_ns_name()
64 if (curr == view) in aa_ns_name()
67 if (aa_ns_visible(curr, view, subns)) { in aa_ns_name()
68 /* at this point if a ns is visible it is in a view ns in aa_ns_name()
74 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name()
200 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument
202 struct aa_ns *ns = view; in __aa_lookupn_ns()
221 * aa_lookupn_ns - look up a policy namespace relative to @view
222 * @view: namespace to search in (NOT NULL)
231 struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n) in aa_lookupn_ns() argument
236 ns = aa_get_ns(__aa_lookupn_ns(view, name, n)); in aa_lookupn_ns()