Lines Matching full: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) in aa_ns_visible() argument
42 if (curr == view) in aa_ns_visible()
48 for ( ; view; view = view->parent) { in aa_ns_visible()
49 if (view->parent == curr) in aa_ns_visible()
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) in aa_ns_name() argument
66 /* if view == curr then the namespace name isn't displayed */ in aa_ns_name()
67 if (curr == view) in aa_ns_name()
70 if (aa_ns_visible(curr, view, subns)) { in aa_ns_name()
71 /* at this point if a ns is visible it is in a view ns in aa_ns_name()
77 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name()
164 * @view: namespace to search in (NOT NULL)
174 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument
176 struct aa_ns *ns = view; in __aa_lookupn_ns()
195 * aa_lookupn_ns - look up a policy namespace relative to @view
196 * @view: namespace to search in (NOT NULL)
205 struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n) in aa_lookupn_ns() argument
210 ns = aa_get_ns(__aa_lookupn_ns(view, name, n)); in aa_lookupn_ns()