Lines Matching refs: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)
39 if (curr == view)
45 for ( ; view; view = view->parent) {
46 if (view->parent == curr)
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)
63 /* if view == curr then the namespace name isn't displayed */
64 if (curr == view)
67 if (aa_ns_visible(curr, view, subns)) {
68 /* at this point if a ns is visible it is in a view ns
74 return view->base.hname + strlen(curr->base.hname) + 2;
200 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n)
202 struct aa_ns *ns = view;
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)
236 ns = aa_get_ns(__aa_lookupn_ns(view, name, n));