Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_hist.c Create Date:2022-07-28 12:29:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:parse_assignment

Proto:static int parse_assignment(struct trace_array *tr, char *str, struct hist_trigger_attrs *attrs)

Type:int

Parameter:

TypeParameterName
struct trace_array *tr
char *str
struct hist_trigger_attrs *attrs
2099  ret = 0
2101  If (len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to ) || (len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to ) Then
2103  keys_str = kstrdup(str + len, GFP_KERNEL)
2104  If Not keys_str Then
2105  ret = -ENOMEM
2106  Go to out
2108  Else if (len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to ) || (len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to ) || (len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to ) Then
2111  vals_str = kstrdup(str + len, GFP_KERNEL)
2112  If Not vals_str Then
2113  ret = -ENOMEM
2114  Go to out
2116  Else if len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to Then
2117  sort_key_str = kstrdup(str + len, GFP_KERNEL)
2118  If Not sort_key_str Then
2119  ret = -ENOMEM
2120  Go to out
2122  Else if str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to Then
2123  name = kstrdup(str, GFP_KERNEL)
2124  If Not name Then
2125  ret = -ENOMEM
2126  Go to out
2128  Else if len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to Then
2129  str += len
2131  str = strstrip(str)
2132  clock = kstrdup(str, GFP_KERNEL)
2133  If Not clock Then
2134  ret = -ENOMEM
2135  Go to out
2137  Else if len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to Then
2138  map_bits = parse_map_size(str + len)
2140  If map_bits < 0 Then
2141  ret = map_bits
2142  Go to out
2144  map_bits = map_bits
2145  Else
2150  ret = -EINVAL
2151  Go to out
2154  assignment = kstrdup(str, GFP_KERNEL)
2155  If Not assignment Then
2156  ret = -ENOMEM
2157  Go to out
2160  assignment_str[n_assignments++] = assignment
2162  out :
2163  Return ret
Caller
NameDescribe
parse_hist_trigger_attrs