Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\string.c Create Date:2022-07-28 06:00:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:strnstr - Find the first substring in a length-limited string*@s1: The string to be searched*@s2: The string to search for*@len: the maximum number of characters to search

Proto:char *strnstr(const char *s1, const char *s2, size_t len)

Type:char

Parameter:

TypeParameterName
const char *s1
const char *s2
size_tlen
973  l2 = strlen(s2)
974  If Not l2 Then Return s1
976  When len >= l2 cycle
977  len--
978  If Not memcmp(s1, s2, l2) Then Return s1
980  s1++
982  Return NULL
Caller
NameDescribe
__lookupn_profile__lookupn_profile - lookup the profile matching @hname*@base: base list to start looking up profile name from (NOT NULL)*@hname: hierarchical profile name (NOT NULL)*@n: length of @hname* Requires: rcu_read_lock be held* Returns: unrefcounted profile
__aa_lookupn_ns__aa_lookupn_ns - lookup the namespace matching @hname*@base: base list to start looking up profile name from (NOT NULL)*@hname: hierarchical ns name (NOT NULL)*@n: length of @hname* Requires: rcu_read_lock be held* Returns: unrefcounted ns pointer or