/* * split individual debug cases out in preparation for finer grained * debug controls in the future.
*/ #define dbg_printk(__fmt, __args...) pr_debug(__fmt, ##__args)
/** * aa_strneq - compare null terminated @str to a non null terminated substring * @str: a null terminated string * @sub: a substring, not necessarily null terminated * @len: length of @sub to compare * * The @str string must be full consumed for this to be considered a match
*/ staticinlinebool aa_strneq(constchar *str, constchar *sub, int len)
{ return !strncmp(str, sub, len) && !str[len];
}
/** * aa_dfa_null_transition - step to next state after null character * @dfa: the dfa to match against * @start: the state of the dfa to start matching in * * aa_dfa_null_transition transitions to the next state after a null * character which is not used in standard matching and is only * used to separate pairs.
*/ staticinline aa_state_t aa_dfa_null_transition(struct aa_dfa *dfa,
aa_state_t start)
{ /* the null transition only needs the string's null terminator byte */ return aa_dfa_next(dfa, start, 0);
}
staticinline __counted char *aa_get_str(__counted char *str)
{ if (str)
kref_get(&(str_to_counted(str)->count));
return str;
}
staticinlinevoid aa_put_str(__counted char *str)
{ if (str)
kref_put(&str_to_counted(str)->count, aa_str_kref);
}
/* struct aa_policy - common part of both namespaces and profiles * @name: name of the object * @hname - The hierarchical name * @list: list policy object is on * @profiles: head of the profiles list contained in the object
*/ struct aa_policy { constchar *name;
__counted char *hname; struct list_head list; struct list_head profiles;
};
/** * basename - find the last component of an hname * @hname: hname to find the base profile name component of (NOT NULL) * * Returns: the tail (base profile name) name component of an hname
*/ staticinlineconstchar *basename(constchar *hname)
{ char *split;
/** * __policy_find - find a policy by @name on a policy list * @head: list to search (NOT NULL) * @name: name to search for (NOT NULL) * * Requires: rcu_read_lock be held * * Returns: unrefcounted policy that match @name or NULL if not found
*/ staticinlinestruct aa_policy *__policy_find(struct list_head *head, constchar *name)
{ struct aa_policy *policy;
/** * __policy_strn_find - find a policy that's name matches @len chars of @str * @head: list to search (NOT NULL) * @str: string to search for (NOT NULL) * @len: length of match required * * Requires: rcu_read_lock be held * * Returns: unrefcounted policy that match @str or NULL if not found * * if @len == strlen(@strlen) then this is equiv to __policy_find * other wise it allows searching for policy by a partial match of name
*/ staticinlinestruct aa_policy *__policy_strn_find(struct list_head *head, constchar *str, int len)
{ struct aa_policy *policy;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.