Lines Matching refs:s
34 static int match_one(char *s, const char *p, substring_t args[]) in match_one() argument
46 return strcmp(p, s) == 0; in match_one()
48 if (strncmp(p, s, meta-p)) in match_one()
51 s += meta - p; in match_one()
57 if (*s++ != '%') in match_one()
66 args[argc].from = s; in match_one()
69 size_t str_len = strlen(s); in match_one()
75 args[argc].to = s + len; in match_one()
79 simple_strtol(s, &args[argc].to, 0); in match_one()
82 simple_strtoul(s, &args[argc].to, 0); in match_one()
85 simple_strtoul(s, &args[argc].to, 8); in match_one()
88 simple_strtoul(s, &args[argc].to, 16); in match_one()
96 s = args[argc].to; in match_one()
115 int match_token(char *s, const match_table_t table, substring_t args[]) in match_token() argument
119 for (p = table; !match_one(s, p->pattern, args) ; p++) in match_token()
138 static int match_number(substring_t *s, int *result, int base) in match_number() argument
145 if (match_strlcpy(buf, s, NUMBER_BUF_LEN) >= NUMBER_BUF_LEN) in match_number()
170 static int match_u64int(substring_t *s, u64 *result, int base) in match_u64int() argument
176 if (match_strlcpy(buf, s, NUMBER_BUF_LEN) >= NUMBER_BUF_LEN) in match_u64int()
194 int match_int(substring_t *s, int *result) in match_int() argument
196 return match_number(s, result, 0); in match_int()
210 int match_uint(substring_t *s, unsigned int *result) in match_uint() argument
214 if (match_strlcpy(buf, s, NUMBER_BUF_LEN) >= NUMBER_BUF_LEN) in match_uint()
233 int match_u64(substring_t *s, u64 *result) in match_u64() argument
235 return match_u64int(s, result, 0); in match_u64()
249 int match_octal(substring_t *s, int *result) in match_octal() argument
251 return match_number(s, result, 8); in match_octal()
265 int match_hex(substring_t *s, int *result) in match_hex() argument
267 return match_number(s, result, 16); in match_hex()
285 const char *s = str; in match_wildcard() local
289 while (*s) { in match_wildcard()
292 s++; in match_wildcard()
297 str = s; in match_wildcard()
303 if (*s == *p) { in match_wildcard()
304 s++; in match_wildcard()
310 s = str; in match_wildcard()
359 char *match_strdup(const substring_t *s) in match_strdup() argument
361 return kmemdup_nul(s->from, s->to - s->from, GFP_KERNEL); in match_strdup()