Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Parse `str' as a flags specification, format [-+=][p]+.* Sets up *maskp and *flagsp to be used when changing the* flags fields of matched _ddebug's. Returns 0 on success* or <0 on error.

Proto:static int ddebug_parse_flags(const char *str, unsigned int *flagsp, unsigned int *maskp)

Type:int

Parameter:

TypeParameterName
const char *str
unsigned int *flagsp
unsigned int *maskp
398  flags = 0
399  op = '='
402  Case str == '+'
403  Case str == '-'
404  Case str == '='
405  op = str++
406  Break
407  Default
408  pr_err("bad flag-op %c, at start of %s\n", * str, str)
409  Return -EINVAL
411  vpr_info("op='%c'\n", op)
413  When str cycle
414  When i >= 0 cycle
415  If str == opt_char Then
416  flags |= flag
417  Break
420  If i < 0 Then
421  pr_err("unknown flag '%c' in \"%s\"\n", * str, str)
422  Return -EINVAL
425  vpr_info("flags=0x%x\n", flags)
429  Case op == '='
430  maskp = 0
431  flagsp = flags
432  Break
433  Case op == '+'
434  maskp = ~0U
435  flagsp = flags
436  Break
437  Case op == '-'
438  maskp = ~flags
439  flagsp = 0
440  Break
442  vpr_info("*flagsp=0x%x *maskp=0x%x\n", * flagsp, * maskp)
443  Return 0
Caller
NameDescribe
ddebug_exec_query